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
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
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
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.