当前位置:网站首页>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 .
边栏推荐
- Based on the order flow tool, what can we see?
- How long will the PMP test results come out? You must know this!
- 双向电平转换电路
- Lumiprobe cell imaging analysis: PKH26 cell membrane labeling kit
- When excel copies the contents of a row, the columns are separated by the tab "\t"
- Store inventory management system source code
- 【SkyWalking】一口气学完分布式链路追踪SkyWalking
- MySQL 45讲 | 05 深入浅出索引(下)
- 如何学习可编程逻辑控制器(PLC)?
- How to do a good job of gateway high availability protection in the big promotion scenario
猜你喜欢

How high is the gold content of grade II cost engineer certificate? Just look at this

CpG solid support research: lumiprobe general CpG type II

Extjs图书管理系统源码 智能化图书管理系统源码

Simulation questions and answers of the latest national fire-fighting facility operators (primary fire-fighting facility operators) in 2022

吴恩达深度学习测验题:deeplearning.ai-week1-quiz

Dart学习——函数、类

Biovendor sRAGE protein solution

店铺进销存管理系统源码

开关电源电压型与电流型控制

The short video local life section has become popular. How to grasp the new opportunities?
随机推荐
gorm事务体验
Reactive dye research: lumiprobe af594 NHS ester, 5-isomer
氨基染料研究:Lumiprobe FAM 胺,6-异构体
Unity delegate
Hundreds of lines of code to implement a script interpreter
Intensive learning notes
OpenSSL client programming: SSL session failure caused by an obscure function
Based on the order flow tool, what can we see?
PCR/qPCR研究:Lumiprobe丨dsGreen 用于实时 PCR
DPDK 源码测试时性能下降问题
Prove that there are infinite primes / primes
Keil C51的Data Overlaying机制导致的函数重入问题
关系数据库与文档数据库对比
【JVM】——JVM中內存劃分
BioVendor sRAGE Elisa试剂盒化学性质和技术研究
How long will the PMP test results come out? You must know this!
!‘ Cat 'is not an internal or external command, nor is it a runnable program or batch file.
Amino dye research: lumiprobe fam amine, 6-isomer
Is it enough for the project manager to finish the PMP? no, it isn't!
Excel将一行的内容进行复制时,列与列之间是用制表符“\t”进行分隔的