forked from saurabh/orbit4-5
fix switch_language
This commit is contained in:
parent
b4e5d36cc3
commit
5f50d59333
|
@ -353,7 +353,7 @@ module ApplicationHelper
|
||||||
|
|
||||||
url = url.gsub("/#{locale.to_s}/","/#{loc.to_s}/")
|
url = url.gsub("/#{locale.to_s}/","/#{loc.to_s}/")
|
||||||
url = url.gsub("locale=#{locale.to_s}","locale=#{loc.to_s}") if url == request.original_fullpath
|
url = url.gsub("locale=#{locale.to_s}","locale=#{loc.to_s}") if url == request.original_fullpath
|
||||||
url = url + "#{url.include?("?") ? "&" : "?"}locale=#{loc.to_s}" if url == request.original_fullpath and !url.include?(locale.to_s)
|
url = url + "#{url.include?("?") ? "&" : "?"}locale=#{loc.to_s}" if url == request.original_fullpath and (!url.include?('/'+locale.to_s) or !url.include?(locale.to_s+'='))
|
||||||
url
|
url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
|
<li class="<%= (l == I18n.locale and !session['zh_cn']) ? "active" : "" %>">
|
||||||
<a href="<%= switch_language(l) %>"><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
|
<a href="<%= switch_language(l) %>"><%= t((l==:zh_tw ? :zh_tw_ : :_locale ), :locale => l) %></a>
|
||||||
</li>
|
</li>
|
||||||
<% if current_site.enable_zh_cn and l == :zh_tw %>
|
<% if current_site.enable_zh_cn and l == :zh_tw and !request.path.include?("/admin/") %>
|
||||||
<li class="<%= locale==:zh_cn ? "active" : "" %>">
|
<li class="<%= locale==:zh_cn ? "active" : "" %>">
|
||||||
<a href="<%= switch_language(:zh_cn) %>"><%= t(:zh_cn, :locale => :zh_tw) %></a>
|
<a href="<%= switch_language(:zh_cn) %>"><%= t(:zh_cn, :locale => :zh_tw) %></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -217,6 +217,7 @@ zh_tw:
|
||||||
end_date: 結束日期
|
end_date: 結束日期
|
||||||
errors:
|
errors:
|
||||||
at_least_one: 至少擁有一個值
|
at_least_one: 至少擁有一個值
|
||||||
|
expired: 已結束
|
||||||
field: 欄位
|
field: 欄位
|
||||||
file:
|
file:
|
||||||
size: 檔案大小
|
size: 檔案大小
|
||||||
|
|
Loading…
Reference in New Issue