thinkphp页面的简体、繁体、英文其间的转换
thinkphp页面的简体、繁体、英文之间的转换
点击下载简体、繁体、英文
例:简体文件
lan_chinese.php:简体文件
//var_dump($_SESSION);die;
$lan = array(
'shouye'=>'首页',
'guanyu'=>'关于UEX',
'dianzishangcheng'=>'电子商城',
'daigoufuwu'=>'代购服务',
'zhifufangshi'=>'支付方式',
'jiaoyitishi'=>'交易提示',
'jiaoyibaozhang'=>'交易保障',
'lianxiwomen'=>'联系我们',
'sheweishouye'=>'设为首页',
'jiarushoucang'=>'加入收藏',
'bangzhu'=>'帮助',
'jiantizhongwen'=>'简体中文',
'fantizhongwen'=>'繁体中文',
'denglu'=>'登陆',
'huiyuanzhongxin'=>'会员中心',
'tuichu'=>'退出',
'zhaohuimima'=>'找回密码',
'wangjimimala'=>'忘记了密码?请输入用户名和注册时填写的邮箱,我们会把重设密码邮件发送到您的邮箱!',
'gongyingshang'=>'供货商注册管理中心',
'guke'=>'顾客会员注册管理中心',
'ninhao'=>'您好!',
'huanyinglaidaoxianggang'=>'欢迎来到香港联合交易所',
'huanying'=>'欢迎进入UEX!UEX将引领您走了入中国,了解中国。',
'shuruguanjianzi'=>'请输入关键字',
'fanbanbijiu'=>'2012 香港商品联合交易所版权所有,翻版必究',
'gouwuzhinan'=>'购物指南',
'daigouzhinan'=>'代购指南',
'shouhoufuwu'=>'售后服务',
'shangchengdongtai'=>'商城动态',
'jiaoyishuju'=>'交易数据',
'renwenshangpinzhishu'=>'人文商品指数',
'liaojiezhongguo'=>'了解中国',
'zhongguojingdian'=>'中国经典',
'renwenshangpin'=>'人文商品',
'qitateseshangpin'=>'其他特色商品',
'renwenshangpintuijian'=>'人文商品推荐 ',
'qitateseshangpintuijian'=>'其他特色商品推荐',
'shangchenggonggao'=>'商城公告',
'rexiaoshangpin'=>'热销商品',
'huoyunhao'=>'货运号',
'fahuoriqi'=>'发货日期',
'chushoujia'=>'出售价',
'zhongliang'=>'重量',
'jian'=>'件',
'peisongdiqu'=>'配送地区',
'peisongfangshi'=>'配送方式',
'yishouchu'=>'已售出',
'danjiansong'=>'单件送',
'woyaoxuangou'=>'我要选购',
'zongjiage'=>'总价格',
'yuan'=>'元',
'yiyou'=>'已有',
'shoucang'=>'人收藏',
'renliulan'=>'人浏览',
'tongleichanpintuijian'=>'同类产品推荐',
'xiangxixinxi'=>'详细信息',
'jiaoyibaozhang'=>'交易保障',
'yunfeishouming'=>'运费说明',
'jiaoyifangshi'=>'交易方式',
'lianxifangshi'=>'联系方式',
'kucunshengyu'=>'库存剩余',
'jifenyingxiang'=>'积分影响您的代理商级别',
'shoujia'=>'售价',
'shangpinbianhao'=>'商品编号',
'zhanwushangpin'=>'暂无商品',
'fangbian'=>'为了您方便管理您的订单,请您输入管理账户和密码',
'huiyuandenglu'=>'会员登录',
'huiyuanzhuce'=>'会员注册',
'yonghuming'=>'用户名',
'mima'=>'密码',
'chongfumima'=>'重复密码',
'youxiang'=>'邮箱',
'yanzhengma'=>'验证码',
'jizhuyonghuming'=>'记住用户名和密码',
'wangjimima'=>'忘记密码?',
'meiyouzhanghao'=>'没有账号?',
'lijizhuce'=>'立即注册 ',
'xuanzemian'=>'积分/M值价值高,选择面广',
'xinfaxian'=>'香港商品联合交易所还在不断扩充新品,每天您都会有新的惊喜 ',
'quanguofanwei'=>'全国范围内送货上门',
'xianzaijiu'=>'我还没有注册,现在就',
'zhucehuiyuan'=>'注册会员',
'boda'=>'如果您在购买过程中有任何疑问请拨打',
'fanhuishouye'=>'返回首页',
'ruguozhuce'=>'如果您已注册会员请点击登录',
);
?>
前台文件的判断部分(放在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';
}
下面是在页面输出的被翻译后的文字
{ $lan['下标名称']}
例:
{ $lan['shouye']}输出的是“首页”

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics



PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

To work on file upload we are going to use the form helper. Here, is an example for file upload.

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

CakePHP is an open source MVC framework. It makes developing, deploying and maintaining applications much easier. CakePHP has a number of libraries to reduce the overload of most common tasks.

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an

A string is a sequence of characters, including letters, numbers, and symbols. This tutorial will learn how to calculate the number of vowels in a given string in PHP using different methods. The vowels in English are a, e, i, o, u, and they can be uppercase or lowercase. What is a vowel? Vowels are alphabetic characters that represent a specific pronunciation. There are five vowels in English, including uppercase and lowercase: a, e, i, o, u Example 1 Input: String = "Tutorialspoint" Output: 6 explain The vowels in the string "Tutorialspoint" are u, o, i, a, o, i. There are 6 yuan in total

JWT is an open standard based on JSON, used to securely transmit information between parties, mainly for identity authentication and information exchange. 1. JWT consists of three parts: Header, Payload and Signature. 2. The working principle of JWT includes three steps: generating JWT, verifying JWT and parsing Payload. 3. When using JWT for authentication in PHP, JWT can be generated and verified, and user role and permission information can be included in advanced usage. 4. Common errors include signature verification failure, token expiration, and payload oversized. Debugging skills include using debugging tools and logging. 5. Performance optimization and best practices include using appropriate signature algorithms, setting validity periods reasonably,
