Agile Toolkit localization

好久不见. 提交于 2019-12-07 12:00:31

Here is the most recent localization branch.

https://github.com/atk4/atk4/tree/locale

they call $this->api->_() which you can override and make it call _() or any other way.

$this->add('translation/Controller_Basic')
    ->setLocale('de')                      // default language
    ->setModel('translation/Translation'); // use your model if you wish

$this->routePages('translation');          // adds translation/admin page

$this->add('Button')->setLabel('Localization Test');

If you use the translation controller with debug argument, it will add smileys to all the non-localized strings:

$this->add('translation/Controller_Basic',array('debug'=>true))

Records which has no translation will be automatically added through the model.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!