yii 国际化
2024-08-25 17:47:27
http://www.yiichina.com/doc/guide/2.0/tutorial-i18n
config/main.php
外层加
'language' => 'en-US',
'sourceLanguage' => 'zh-CN',
components里加
'i18n' => [
'translations' => [
'*' => [
'class' => 'yii\i18n\PhpMessageSource',
//'basePath' => '/messages',
'fileMap' => [
'collection' => 'collection.php'
],
],
],
],
简单使用
Yii::t('app', 'This is a string to translate!');
config同级目录下建messages目录
最新文章
- NoSql数据库使用半年后在设计上面的一些心得
- mysql 修改 character_set_database 编码格式
- Altium Designer PCB 常用功能键
- Ubuntu下VIM(GVIM)环境配置
- 【Java SE】如何用Java实现直接选择排序
- Win32线程安全问题.同步函数
- 【XSY2190】Alice and Bob VI 树形DP 树剖
- highChart 缺值-曲线断开问题
- dubbo框架原理
- How-to Install VMware Tools on Debian Stretch 9 32/64bit Linux+GNU
- 并发编程之 Condition 源码分析
- plsql 导出查询结果
- APM最佳实践: 诊断平安城市视频网性能问题
- PAT 1057 Stack [难][树状数组]
- JDK版本Java SE、Java EE、Java ME的区别
- P2672 推销员 优先队列 + 贪心
- eclipse的最新版本luna的中建立svn和maven
- Powershell 获取文件版本信息
- 到底什么是hash
- win vista系统的ReadyBoost性能测试