forked from saurabh/orbit4-5
Fix zh_cn language switching
This commit is contained in:
parent
562a7a79b8
commit
a6cc379e7a
|
@ -370,7 +370,7 @@ class PagesController < ApplicationController
|
||||||
if session[:zh_cn]
|
if session[:zh_cn]
|
||||||
final_html = ZhConv.convert("zh-cn", final_html)
|
final_html = ZhConv.convert("zh-cn", final_html)
|
||||||
final_html.gsub!('/zh_tw/','/zh_cn/')
|
final_html.gsub!('/zh_tw/','/zh_cn/')
|
||||||
final_html.sub!('<a href="/zh_cn/news">繁体中文</a>','<a href="/zh_tw/news">繁体中文</a>')
|
final_html.sub!('<a href="'+request.path+'">繁体中文</a>','<a href="'+(request.path.sub('/zh_cn/','/zh_tw/'))+'">繁体中文</a>')
|
||||||
end
|
end
|
||||||
final_html
|
final_html
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue