Best way to manage/share common translation strings between bundles

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 17:32:27

问题


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?


回答1:


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.

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.



来源:https://stackoverflow.com/questions/11629590/best-way-to-manage-share-common-translation-strings-between-bundles

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