在包之间管理/共享通用翻译字符串的最佳方法 [英] Best way to manage/share common translation strings between bundles

查看:71
本文介绍了在包之间管理/共享通用翻译字符串的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我阅读了有关翻译和i18n的官方文档,并说xliff文件必须放在bundle中或放在app/Resources/translations目录中.我有很多捆有自己的琴弦,但有些捆也用在其他捆中.在bundle之间管理/共享通用翻译字符串的最佳策略是哪种?

I read official docs about translation and i18n and say that xliff files must be put inside bundle or in app/Resources/translations directory. I have many bundles with your own strings, but some strings are used in others bundles too. Which is best strategy to manage/share common translation strings between bundles?

推荐答案

我个人是

Personally, I don't use bundles for app specific code, so I keep all resources — views, translations, assets, etc — in app/Resources. You could consider this approach as well.

否则,如果您认为确实需要捆绑销售商品,则可以将常用翻译保存在app/Resources/translations-或CommonBundle中,我最近

Otherwise, if you think you really need bundles, you could keep common translations in app/Resources/translations — or CommonBundle which I lately suggest to avoid — while keeping the bundle specific translations in themselves.

这篇关于在包之间管理/共享通用翻译字符串的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆