aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/general/_locale_switcher.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/general/_locale_switcher.html.erb')
-rw-r--r--app/views/general/_locale_switcher.html.erb13
1 files changed, 13 insertions, 0 deletions
diff --git a/app/views/general/_locale_switcher.html.erb b/app/views/general/_locale_switcher.html.erb
new file mode 100644
index 000000000..2521b5eb5
--- /dev/null
+++ b/app/views/general/_locale_switcher.html.erb
@@ -0,0 +1,13 @@
+ <% if FastGettext.default_available_locales.length > 1 && !params.empty? %>
+ <div id="user_locale_switcher">
+ <div class="btn-group">
+ <% for possible_locale in FastGettext.default_available_locales %>
+ <% if possible_locale == I18n.locale.to_s %>
+ <a href="#" class="btn disabled"><%= locale_name(possible_locale) %></a>
+ <% else %>
+ <a href="<%= locale_switcher(possible_locale, params) %>" class="btn"><%= locale_name(possible_locale) %></a>
+ <% end %>
+ <% end %>
+ </div>
+ </div>
+ <% end %>