thru.io/translation
Composer 安装命令:
composer require thru.io/translation
包简介
Support multi-lingual in YOUR application! :D
README 文档
README
Support multi-lingual in YOUR application! :D
Install like so:
composer require "thru.io/translation": "dev-master"
Setup like so:
use \Thru\Translation\Translation;
Translation::setOriginalLanguage('en-gb');
Translation::setTargetLanguage('fr');
You will note you are responsible for deciding what the target language will be! Be that browser-detection or user-agent sniffing or giving the user a language selection or whatever.
The helper function t() is provided.
Then translate with tokens like so:
<?=t("Hello, :name, how are you?", [":name" => "Bob"]); ?>
统计信息
- 总下载量: 449
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2014-09-20