标签: yii2 gettext messages
我们在Yii2中以php数组格式存在翻译文件,并希望将它们转换为po/gettext格式。
po/gettext
有一个php2po工具,你可以运行
php2po -P messages/en pot/
但我正在为数字翻译等元素寻找更好的解决方案。像:
return [ '{n,plural,=1{file} other{files}}'=>'{n,plural,=1{arxiuvo} other{archivos}}', ]