This is the method that I summarize when I am doing the project, of course, if you have a better way, you can share it with me.
Generally I would suggest to build 2 documents, a Chinese one in English
On the View page:
' CN '));?> "> Chinese" en ") ?>" >english
On the Controller page:
$page = ' newexhibitors ', if (isset ($_get[' language ')) { if ($_get[' language ']== ' cn ') { $_session[' lan '] = ' cn ' ; $title = ' test '; Require APP::TPL (' newexhibitors '); } else if ($_get[' language ']== ' en ') { $_session[' lan '] = ' en '; $title = ' Test '; Require APP::TPL (' en_newexhibitors ');} } else{ if ($_session[' LAN ')} { if ($_session[' LAN ']== ' CN ') { $title = ' Test '; Require APP::TPL (' newexhibitors '); } else{ $title = ' Test '; Require APP::TPL (' en_newexhibitors '); } } else{ $_session[' LAN ']= ' CN '; $title = ' test '; Require APP::TPL (' newexhibitors ');} }
This code implementation of the effect, click on the "Chinese/English" text switch, automatically on the current page to switch