Thinkphp page conversion between simplified, traditional, and English. Example: Simplified file lan_chinese.php: Simplified file? Phpvar_dump ($ _ SESSION); die; $ lanarray (shouye homepage, guanyu about UEX, dianzishangcheng e-mall, daigoufuwu shopping service example: Simplified file
Lan_chinese.php: Simplified file
// Var_dump ($ _ SESSION); die;
$ Lan = array (
'Shouye '=> 'homepage ',
'Guanyu' => 'About UEX ',
'Dianzishangcheng' => 'electronic mall ',
'Daigoufuwu' => 'purchasing service ',
'Zhifufangshi '=> 'payment method ',
'Jiaoyitishi' => 'transaction HS ',
'Jiaoyibaozhang' => 'transaction security ',
'Lianxiwomen' => 'Contact us ',
'Sheweishouye '=> 'Set as homepage ',
'Jiarushoucang '=> 'Add to favorites ',
'Bangzhu' => 'Help ',
'Jiantizhong' => 'Simplified Chinese ',
'Fantizhong' => 'traditional Chinese characters ',
'Deng' => 'Login ',
'Huiyuanzhongxin' => 'Member Center ',
'Tuichu' => 'logout ',
'Zhaohuimim' => 'Retrieve password ',
'Wangjimimala' => 'forgot password? Please enter your username and the email address you entered during registration. we will send the password reset email to your mailbox! ',
'Gongyingshang '=> 'Supplier registration management Center ',
'Guke '=> 'customer member registration management Center ',
'Ninhao' => 'Hello! ',
'Huanyinglaidaoxianggang '=> 'Welcome to the Hong Kong stock exchange ',
'Huanying' => 'Welcome to UEX! UEX will lead you to China and learn more about China. ',
'Shuruguanjianzi' => 'Enter the keyword ',
'Fanbanbijiu' => '2017 Hong Kong Stock Exchange All rights reserved, review required ',
'Gouwuzhinan '=> 'shopping Guide ',
'Daigouzhinan '=> 'purchasing Guide ',
'Shouhoufuwu' => 'aftersales service ',
'Shangchengdongtai' => 'Mall News ',
'Jiaoyishuju' => 'transaction data ',
'Renwenshangpinzhishu '=> 'humanistic commodity Index ',
'Liaojiezhongguo' => 'learn about China ',
'Zhongguojingdian '=> 'Chinese Classic ',
'Renwenshangpin' => 'humanistic product ',
'Qitateseshangpin' => 'Other special products ',
'Renwenshangpintuijian '=> 'humanistic commodity recommend ',
'Qitateseshangpintuijian '=> 'Recommendations for other featured items ',
'Shangchenggonggao' => 'Mall bulletins ',
'Rexiaohangpin '=> 'hot-selling product ',
'Huoyunhao' => 'Freight no ',
'Fahuoriqi '=> 'shipping date ',
'Chushoujia '=> 'sale price ',
'Zhongliang '=> 'weight ',
'Jian '=> 'part ',
'Peisongdiqu' => 'distribution region ',
'Peisongfangshi '=> 'delivery method ',
'Ishouku' => 'sold out ',
'Danjiancong' => 'single-piece delivery ',
'Woyaoxuangou '=>' I want to purchase ',
'Zongjiage' => 'Total Price ',
'Yuany' => 'meta ',
'Yiyou' => 'existing ',
'Shoucang '=> 'Add to favorites ',
'Renlila' => 'Browsing by People ',
'Tongleichanpintuijian '=> 'similar product recommend ',
'Xiangxiinxi' => 'Details ',
'Jiaoyibaozhang' => 'transaction security ',
'Yunfeishouming '=> 'Freight description ',
'Jiaoyifangshi '=> 'transaction method ',
'Lianxifangshi '=> 'contact information ',
'Kucunshengyu '=> 'inventory surplus ',
'Jifenyingxiang '=> 'points affect your agent level ',
'Shoujia '=> 'price ',
'Shangpinbianhao' => 'item no ',
'Zhanwushangpin' => 'No production ',
'Hangby' => 'Enter the management account and password to facilitate order management ',
'Huiyuandeng' => 'Member logon ',
'Huiyuanzhuce '=> 'Member registration ',
'Yonghuming' => 'username ',
'Mima' => 'password ',
'Chongfumima '=> 'repeat password ',
'Youxiang '=> 'mailbox ',
'Yanzheng' => 'verification code ',
'Jizhuyonghuming '=> 'Remember username and password ',
'Wangjimim' => 'forgot password? ',
'Meiyouzhanghao' => 'no account? ',
'Lijizhuce '=> 'register now ',
'Xuanzemian '=> 'high point/M value, wide Selection ',
'Xinfaxian '=> 'Hong Kong stock exchange is still expanding new products, and you will have new surprises every day ',
'Quanguofanwei' => 'Home Delivery nationwide ',
'Xianzaijiu' => 'I have not registered, now ',
'Zhucehuiyuan '=> 'registering a member ',
'Boda' => 'if you have any questions during the purchase process, please call ',
'Fanhuishouye '=> 'back to homepage ',
'Ruguozhuce '=>' if you have registered a member, Click login ',
);
?>
Front-end file judgment part (just put it in head)
Switch ($ _ SESSION ['lan']) {
Case 1:
Include './lan_chinese.php ';
Break;
Case 2:
Include './lan_chineseFt.php ';
Break;
Case 3:
Include './lan_english.php ';
Break;
Default: include './lan_chinese.php ';
}
The following is the translated text output on the page.
{$ Lan ['subscript name']}
Example:
{$ Lan ['shouye ']} outputs the "homepage"
Lan_chinese.php: Simplified file? Php // var_dump ($ _ SESSION); die; $ lan = array (shouye = homepage, guanyu = about UEX, dianzishangcheng = Electronic Mall, daigoufuwu = purchasing service...