Module | Locale |
In: |
lib/locale/base.rb
lib/locale/object.rb lib/locale/jruby.rb lib/locale/posix.rb lib/locale/win32_table.rb lib/locale/win32.rb lib/locale/cgi.rb lib/locale.rb |
Locale module manages the locale informations of the application.
Gets the current locale (Locale::Object).
If the current locale is not set, this returns default locale.
Sets a current locale. This is a single argument version of Locale.set_current.
Locale.current = "ja_JP.eucJP" Locale.current = Locale::Object.new("ja", "JP", "eucJP")
Same as Locale.set_default.
Notice: lctype is deprecated. Use this with no parameter instead.
Sets a default locale. This function is an alias of Locale.set_default with calling set_current(nil).
Notice: Locale.set(lctype, locale) is deprecated.
Sets a locale as the current locale.
This returns the current Locale::Object.
Locale.set_current("ja_JP.eucJP") Locale.set_current("ja", "JP") Locale.set_current("ja", "JP", "eucJP") Locale.set_current("ja", nil, "eucJP") Locale.set_current(Locale::Object.new("ja", "JP", "eucJP"))
Sets the default locale (Locale::Object or String(such as ja_JP.eucJP)).