diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-02-25 15:06:58 +0000 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-03-10 10:55:45 +0000 |
commit | 75c6cde4d869c190fc10ce36ec96f818efb1970f (patch) | |
tree | ed98c5ac839e799d8f01f36b5caf7d82245a050c | |
parent | 05b7200b6badd9570f0ac7d42e32eb475e51f8b5 (diff) |
locale switcher code missing from earlier commit
-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 %> |