-
Notifications
You must be signed in to change notification settings - Fork 14
Language Selector
molpe edited this page Sep 13, 2010
·
2 revisions
In the file vendor/plugins/tog_core/lib/tog_supported_languages.rb a line similar to this needs to be added:
:es => {:iso_639_1 => "es", :iso_639_2 => "spa", :name => "Spanish", :native_name => "Español" }
where “es” and “spa” needs to be replaced with the corresponding iso_639_1 and iso_639_2. Spanish is replaced with the English name of that language, whereas Español is replaced with the native name of the language.
Also you will have to add a translation of the locale files for each tog plugin found in vendor/plugin/tog_plugin_name/locale/*.yml
The following method needs to be overriden in application.rb
def current_user_locale @current_user_locale ||= locale_from_session || locale_from_cookie || locale_from_browser || locale_from_settings end