Translator 1.0.0 and related packages
2021-05-13
1516次浏览
First release of translator package was published. This package allows translating messages into several languages. It can work with both Yii-based applications and standalone PHP applications.
Translations in the code looks like the following:
// single translation
$messageIdentificator = 'submit';
echo $translator->translate($messageIdentificator);
// output: `Submit message`
// translation with plural
$messageIdentificator = 'multiHumans';
echo $translator->translate($messageIdentificator, ['n' => 3]);
// output: `3 humans
Mutliple messages sources and formatters were released as well:
Additional packages that are pretty stable but not released yet are database message source and console command for extracting message IDs from the source code.
新闻归档
热门标签
- yii3
- 扩展
- 发布
- yii2
- debug
- view
- auth client
- html
- bootstrap
- release
- apidoc
- Yii 1.1
- redis
- Yii 2.0
- mongodb
- extensions
- mailer
- runner
- gii
- console
- http 客户端
- queue
- validation
- twig
- error handler
- hydrator
- http
- translator
- cache
- widget
- sphinx
- config
- symfonymailer
- assets
- db
- log
- router
- swagger
- swiftmailer
- elasticsearch
- 图书
- imagine
- fastroute
- rbac
- i18n
- IDE
- user
- definitions
- csrf
- widgets