[英]Default translation file in symfony
如何获得一个通用的翻译文件,其中包括一些常用单词,以供在同一命名空间中的多个包中使用?
If they are in the same app you can resort to the app/Resources/translations
folder. 如果它们在同一个应用程序中,则可以使用
app/Resources/translations
文件夹。 This location, in addition, overrides the translation messages of any bundles. 此外,此位置将覆盖所有捆绑包的翻译消息。
Symfony looks for message files (ie translations) in the following locations:
Symfony在以下位置查找消息文件(即翻译):
- the app/Resources/translations directory;
app / Resources / translations目录;
- the app/Resources//translations directory;
app / Resources // translations目录;
- the Resources/translations/ directory inside of any bundle.
任何捆绑包内的Resources / translations /目录。
The locations are listed here with the highest priority first.
此处列出的位置具有最高优先级。 That is, you can override the translation messages of a bundle in any of the top 2 directories.
也就是说,您可以覆盖前2个目录中任何一个目录中捆绑软件的翻译消息。
Source: http://symfony.com/doc/current/book/translation.html#translation-resource-file-names-and-locations 来源: http : //symfony.com/doc/current/book/translation.html#translation-resource-file-names-and-locations
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.