I18n

Public Instance Methods

default_locale=(tag) click to toggle source

Sets the default locale.

 I18n.default_locale = "ja"
    # File lib/locale_rails/i18n.rb, line 42
42:   def default_locale=(tag)
43:     tag = Locale::Tag::Rfc.parse(tag.to_s) if tag.kind_of? Symbol
44:     Locale.default = tag
45:     @@default_locale = tag
46:   end
locale=(tag) click to toggle source

Sets the locale.

 I18n.locale = "ja-JP"
    # File lib/locale_rails/i18n.rb, line 33
33:   def locale=(tag)
34:     Locale.clear
35:     tag = Locale::Tag::Rfc.parse(tag.to_s) if tag.kind_of? Symbol
36:     Locale.current = tag
37:     Thread.current[:locale] = Locale.candidates(:type => :rfc)[0]
38:   end
set_supported_locales(*tags) click to toggle source

Sets the supported locales.

 I18n.set_supported_locales("ja-JP", "ko-KR", ...)
    # File lib/locale_rails/i18n.rb, line 21
21:   def set_supported_locales(*tags)
22:     Locale.set_app_language_tags(*tags)
23:   end
supported_locales() click to toggle source

Gets the supported locales.

    # File lib/locale_rails/i18n.rb, line 15
15:   def supported_locales 
16:     Locale.app_language_tags
17:   end
supported_locales=(tags) click to toggle source

Sets the supported locales as an Array.

 I18n.supported_locales = ["ja-JP", "ko-KR", ...]
    # File lib/locale_rails/i18n.rb, line 27
27:   def supported_locales=(tags)
28:     Locale.set_app_language_tags(*tags)
29:   end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.