Module: Locale::Driver::Posix
Public Instance Methods
charset ()
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 35 35: def charset 36: charset = ::Locale::Driver::Env.charset 37: unless charset 38: charset = `locale charmap`.strip 39: unless $? && $?.success? 40: charset = nil 41: end 42: end 43: charset 44: end
locales ()
Gets the locales from environment variables. (LANGUAGE > LC_ALL > LC_MESSAGES > 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 28 28: def locales 29: ::Locale::Driver::Env.locales 30: end