我在这里读到了关于双语atk的问题的答案,但我想知道该框架是否适合国际使用?
我测试了CRUD功能(v 4.2)并且无法看到例如按钮的标签(添加,编辑,删除)通过_()函数运行。
有什么计划吗?如果需要和ATK是正确的道路,我可以协助吗?如果是这样的话?
答案 0 :(得分:1)
这是最新的本地化分支。
https://github.com/atk4/atk4/tree/locale
他们调用$ this-> api> _(),您可以覆盖它并使其调用_()或任何其他方式。
$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');
如果您使用带有debug参数的转换控制器,它会将smileys添加到所有非本地化字符串:
$this->add('translation/Controller_Basic',array('debug'=>true))
没有翻译的记录将通过模型自动添加。