当前位置:网站首页>How to develop the language pack in the one-to-one video chat source code
How to develop the language pack in the one-to-one video chat source code
2022-06-28 05:26:00 【Tai'an yunbao Technology】
As a professional One to one video chat source code Development service providers , It is essential to deal with foreign customers , However, due to different languages, some obstacles will be encountered during development and post deployment .
In addition, it is also necessary to consider the language problems of foreign customers when they go online and operate in their home countries , This requires developers to translate their source interface into different national languages . Next, I will share with you how to do .
Organize language packs , The text displayed on the system interface 、 All text prompts and other contents related to language conversion shall be sorted into language packs for translation .
<?php
return array (
'USER_INDEXADMIN_BAN' => ' Black member ',
'USER_INDEXADMIN_CANCELBAN' => ' Enable members ',
'USER_INDEXADMIN_DEFAULT1' => ' User group ',
'USER_INDEXADMIN_DEFAULT3' => ' Management Group ',
'USER_INDEXADMIN_INDEX' => ' Local users ',
'USER_OAUTHADMIN_DELETE' => ' Unbind the third-party user ',
'USER_OAUTHADMIN_INDEX' => ' Third party users ',
'USER_INDEXADMIN_DEFAULT' => ' User management ',
'USER_INDEXADMIN_ADD' => ' New members ',
'USER_INDEXADMIN_ADD_POST' => ' Add new members and modify ',
'USER_INDEXADMIN_CANCELRECOMMEND' => ' Cancel the recommendation ',
'USER_INDEXADMIN_CANCELRECORD' => ' Turn off recording ',
'USER_INDEXADMIN_CANCELZOMBIE' => ' Turn off zombie powder ',
'USER_INDEXADMIN_CANCELZOMBIEP' => ' Unset zombie powder ',
'USER_INDEXADMIN_DEL' => ' Delete member ',
'USER_INDEXADMIN_EDIT' => ' edit ',
'USER_INDEXADMIN_EDIT_POST' => ' edit ',
'USER_INDEXADMIN_RECOMMEND' => ' recommend ',
'USER_INDEXADMIN_RECORD' => ' Start recording ',
'USER_INDEXADMIN_RECORDALL' => ' One key open / Turn off recording ',
'USER_INDEXADMIN_ZOMBIE' => ' Turn on zombie powder ',
'USER_INDEXADMIN_ZOMBIEALL' => ' One key open / Turn off zombie powder ',
'USER_INDEXADMIN_ZOMBIEP' => ' Set to zombie powder ',
'USER_INDEXADMIN_ZOMBIEPBATCH' => ' Batch settings / Cancel zombie powder ',
'USER_INDEXADMIN_CANCELHOT' => ' Cancel hot ',
'USER_INDEXADMIN_CANCELSUPER' => ' Cancel override ',
'USER_INDEXADMIN_HOT' => ' Set hot ',
'USER_INDEXADMIN_SUPER' => ' Set the override ',
);
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
Use language translation methods to translate
function L($name=null, $value=null) {
static $_lang = array();
// Null parameter returns all definitions
if (empty($name))
return $_lang;
// Judge language acquisition ( Or set )
// If it does not exist , Returns all uppercase directly $name
if (is_string($name)) {
$name = strtoupper($name);
if (is_null($value)){
return isset($_lang[$name]) ? $_lang[$name] : $name;
}elseif(is_array($value)){
// Support variables
$replace = array_keys($value);
foreach($replace as &$v){
$v = '{$'.$v.'}';
}
return str_replace($replace,$value,isset($_lang[$name]) ? $_lang[$name] : $name);
}
$_lang[$name] = $value; // Language definition
return null;
}
// Batch definition
if (is_array($name))
$_lang = array_merge($_lang, array_change_key_case($name, CASE_UPPER));
return null;
}
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
Call the language translation method
<admintpl file="header" />
</head>
<body>
<div class="wrap js-check-wrap">
<ul class="nav nav-tabs">
<li class="active"><a href="{:U('user/index')}">{:L('ADMIN_USER_INDEX')}</a></li>
<li><a href="{:U('user/add')}">{:L('ADMIN_USER_ADD')}</a></li>
</ul>
<table class="table table-hover table-bordered">
<thead>
<tr>
<th width="50">ID</th>
<th>{:L('USERNAME')}</th>
<th>{:L('LAST_LOGIN_IP')}</th>
<th>{:L('LAST_LOGIN_TIME')}</th>
<th>{:L('EMAIL')}</th>
<th>{:L('STATUS')}</th>
<th width="120">{:L('ACTIONS')}</th>
</tr>
</thead>
<tbody>
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
<php>$user_statuses=array("0"=>L('USER_STATUS_BLOCKED'),"1"=>L('USER_STATUS_ACTIVATED'),"2"=>L('USER_STATUS_UNVERIFIED'));</php>
<foreach name="users" item="vo">
<tr>
<td>{$vo.id}</td>
<td>{$vo.user_login}</td>
<td>{$vo.last_login_ip}</td>
<td>
<if condition="$vo['last_login_time'] eq 0">
{:L('USER_HAVENOT_LOGIN')}
<else />
{$vo.last_login_time}
</if>
</td>
<td>{$vo.user_email}</td>
<td>{$user_statuses[$vo['user_status']]}</td>
<td>
<if condition="$vo['id'] eq 1">
<font color="#cccccc">{:L('EDIT')}</font> | <font color="#cccccc">{:L('DELETE')}</font> |
<if condition="$vo['user_status'] eq 1">
<font color="#cccccc">{:L('BLOCK_USER')}</font>
<else />
<font color="#cccccc">{:L('ACTIVATE_USER')}</font>
</if>
<else />
<a href='{:U("user/edit",array("id"=>$vo["id"]))}'>{:L('EDIT')}</a> |
<a class="js-ajax-delete" href="{:U('user/delete',array('id'=>$vo['id']))}">{:L('DELETE')}</a> |
<if condition="$vo['user_status'] eq 1">
<a href="{:U('user/ban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="{:L('BLOCK_USER_CONFIRM_MESSAGE')}">{:L('BLOCK_USER')}</a>
<else />
<a href="{:U('user/cancelban',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="{:L('ACTIVATE_USER_CONFIRM_MESSAGE')}">{:L('ACTIVATE_USER')}</a>
</if>
</if>
</td>
</tr>
</foreach>
</tbody>
</table>
<div class="pagination">{$page}</div>
</div>
<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>
- 1.
- 2.
- 3.
- 4.
- 5.
- 6.
- 7.
- 8.
- 9.
- 10.
- 11.
- 12.
- 13.
- 14.
- 15.
- 16.
- 17.
- 18.
- 19.
- 20.
- 21.
- 22.
- 23.
- 24.
- 25.
- 26.
- 27.
- 28.
- 29.
- 30.
- 31.
- 32.
- 33.
- 34.
- 35.
- 36.
- 37.
- 38.
- 39.
- 40.
- 41.
- 42.
That's all One to one video chat source code About the general process of language pack development in , This shows that in order to better meet the needs of customers on different platforms , There are many parts to be covered , So I suggest you find a professional source code service developer .
边栏推荐
- 2022 high altitude installation, maintenance and removal examination questions and answers
- The latest examination questions and answers for the eight members (standard members) of Liaoning architecture in 2022
- BioVendor sRAGE蛋白解决方案
- Pcr/qpcr research: lumiprobe dsgreen is used for real-time PCR
- Metartc5.0 API programming guide (I)
- Prove that there are infinite primes / primes
- Amino dye research: lumiprobe fam amine, 6-isomer
- 程序员-放羊娃
- Unity delegate
- gsap的简单用法
猜你喜欢

2022 high altitude installation, maintenance and removal examination questions and answers
![[JVM] - Division de la mémoire en JVM](/img/d8/29a5dc0ff61e35d73f48effb858770.png)
[JVM] - Division de la mémoire en JVM

Shutter nestedscrollview sliding folding head pull-down refresh effect

The heading angle of sliceplane is the same as that of math Corresponding transformation relation of atan2 (y, x)

如何做好水库大坝安全监测工作

Quartus replication IP core

How to do a good job of gateway high availability protection in the big promotion scenario

codeforces每日5题(均1700)
![[Linux] - using xshell to install MySQL on Linux and realize the deployment of webapp](/img/07/e044a6ef14a6576dbee1c6a009ab4f.png)
[Linux] - using xshell to install MySQL on Linux and realize the deployment of webapp

Dart learning - functions, classes
随机推荐
It is the latest weapon to cross the blockade. It is one of the fastest ladders.
The heading angle of sliceplane is the same as that of math Corresponding transformation relation of atan2 (y, x)
高通平台 Camera 之 MCLK 配置
BioVendor sRAGE蛋白解决方案
Voltage mode and current mode control of switching power supply
如何学习可编程逻辑控制器(PLC)?
Redis 的 最新windows 版本 5.0.14
基于订单流工具,我们能看到什么?
程序员-放羊娃
[skywalking] learn distributed link tracking skywalking at one go
What does mysql---where 1=1 mean
!‘ Cat 'is not an internal or external command, nor is it a runnable program or batch file.
开关电源电压型与电流型控制
2022 high altitude installation, maintenance and removal examination questions and answers
To batch add background pictures and color changing effects to videos
Based on the order flow tool, what can we see?
How to design an awesome high concurrency architecture from scratch (recommended Collection)
2022 safety officer-b certificate examination question bank and answers
What is the difference between AC and DC?
二级造价工程师证书含金量到底有多高?看这些就知道了