Displaying 1 result from an estimated 1 matches for "language_dialect".
2005 Mar 17
2
Using gettext to localize your rails app
...UAGE''].split('','').first.split(''-'')
language = temp.slice(0)
dialect = temp.slice(1)
@language = language.nil? ? ''en'' : language.downcase # default is en
@dialect = dialect.nil? ? language : dialect
# should always produce language_DIALECT (en_EN, en_GB, de_DE, ...)
@locale = "#{language}_#{dialect.upcase}"
ENV[''LC_MESSAGES''] = ENV[''LANG''] = @locale
Locale.set(Locale::MESSAGES, @locale)
@gettext = bindtextdomain(''messages'', "#{RAILS_ROOT}/locale",...