Allow locale to be set through the front-end
* Store the last used locale in the session * Allow home page to be identified in helpers even when containing parameters * Create initializer to explicitly set the available locales, the default and the load_path
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
<div class="small-12 column">
|
||||
<div class="right">
|
||||
<a href="#"><%= t("layouts.header.external_link_transparency") %></a> | <a href="#"><%= t("layouts.header.external_link_opendata") %></a>
|
||||
|
|
||||
<span id="locale-switcher">
|
||||
[
|
||||
<% available_locales_to_switch.each do |locale| %>
|
||||
<%= link_to(locale, params.merge(locale: locale), id: "locale-link-#{locale}") %>
|
||||
<% end %>
|
||||
]
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,4 +50,4 @@
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</header>
|
||||
</header>
|
||||
|
||||
Reference in New Issue
Block a user