class I18n::Config

Public Instance Methods

locale=(locale) click to toggle source
# File lib/translation_io/railtie.rb, line 25
def locale=(locale)
  I18n.enforce_available_locales!(locale) if I18n.respond_to?(:enforce_available_locales!)
  @locale = locale.to_sym rescue nil

  if defined?(GetText)
    GetText.set_current_locale(locale.to_s.gsub('-', '_').to_sym)
  end
end