Module: Locale::Driver::Posix

### Home Classes Methods

### In Files

- lib/locale/driver/posix.rb

### Methods

- #charset
- #locales

### Class/Module Index

Quicksearch

- Locale
- Locale::Driver
- Locale::Driver::CGI
- Locale::Driver::Env
- Locale::Driver::JRuby
- Locale::Driver::Posix
- Locale::Driver::Win32
- Locale::Driver::Win32::Kernel32
- Locale::Driver::Win32Table
- Locale::Info
- Locale::Info::Language
- Locale::Info::Region
- Locale::Middleware
- Locale::Tag
- Locale::Tag::Cldr
- Locale::Tag::Common
- Locale::Tag::Irregular
- Locale::Tag::Posix
- Locale::Tag::Rfc
- Locale::Tag::Simple
- Locale::TagList
- Locale::Util
- Locale::Util::Memoizable

No matching classes.

# Locale::Driver::Posix

### Public Instance Methods

charset() click to toggle source

Gets the charset from environment variable or the result of "locale charmap" or nil.

- Returns: the system charset.

    # File lib/locale/driver/posix.rb, line 42
    def charset
      charset = ::Locale::Driver::Env.charset
      unless charset
        charset = `locale charmap`.strip
        unless $? && $?.success?
          charset = nil
        end
      end
      charset
    end

locales() click to toggle source

Gets the locales from environment variables. (LANGUAGE > LC_ALL > LC_CTYPES > LANG) Only LANGUAGE accept plural languages such as "nl_BE;

- Returns: an Array of the locale as Locale::Tag::Posix or nil.

    # File lib/locale/driver/posix.rb, line 35
    def locales
      ::Locale::Driver::Env.locales
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.