diff options
-rw-r--r-- | app/views/general/_locale_switcher.rhtml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/views/general/_locale_switcher.rhtml b/app/views/general/_locale_switcher.rhtml new file mode 100644 index 000000000..4f01a4d13 --- /dev/null +++ b/app/views/general/_locale_switcher.rhtml @@ -0,0 +1,12 @@ + <% if FastGettext.default_available_locales.length > 1 %> + <div id="user_locale_switcher"> + Language: + <% for possible_locale in FastGettext.default_available_locales %> + <% if possible_locale == I18n.locale.to_s %> + <%= possible_locale %> + <% else %> + <a href="<%= locale_switcher(possible_locale, params) %>"><%= possible_locale %></a> + <% end %> + <% end %> + </div> + <% end %> |