Fix zh_cn language switching

This commit is contained in:
manson 2014-07-20 03:05:30 +08:00
parent 562a7a79b8
commit a6cc379e7a
1 changed files with 1 additions and 1 deletions

View File

@ -370,7 +370,7 @@ class PagesController < ApplicationController
if session[:zh_cn]
final_html = ZhConv.convert("zh-cn", final_html)
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
final_html
end