TP supports multiple languages by get to change the language
Http://localhost/tp/index.php/Admin/User/add/hl/zh-cn
Http://localhost/tp/index.php/Admin/User/add/hl/zh-tw
Multi-language support belongs to behavior extension in library\behavior\checklangbehaviro.class.php
In the configuration file
' lang_switch_on ' + true,//turn on the Language pack feature
' Lang_auto_detect ' + true,//auto-detect language effective after opening multi-language function
' Lang_list ' + ' zh-cn,pt-br,zh-tw,en-us ',//The list of languages allowed to switch is separated by commas
' Var_language ' = ' hl ',//default language toggle Variable
Language zh-cn.php in lang with admin-peer common
To support you will also need to create a new file under common conf tags.php
<?php
Return Array (
Add the following line definition
' App_begin ' = = Array (' Behavior\checklang '),
If 3.2. Version 1 needs to be changed to
' App_begin ' = = Array (' Behavior\checklangbehavior '),
);
L () can pass all variables of the current language to the template
You can also use {$Think. Lang.username} to get
tags.php Source thinkphp\mode\common.php
TP Multi-language support