struts具有默认资源属性“myresource.properties”和语言资源属性“myresource_en.properties”,但在我的项目中实时,我在“myresource.properties”文件中拥有所有英语非适应内容,那么为什么我们需要使用“myresource_en.properties”文件。
谁能解释一下为什么struts默认使用“myresource.properties”,英语默认使用“myresource_en.properties”。
最佳答案
上面提到的_xx代表您想要支持的语言的国家ISO代码。如果您想支持英语和德语,则必须提供文件:
myresource_de.properties (German)
myresource_en.properties (English)
myresource.properties (fallback for all other ISO codes)
编辑:
myresource.properties (fallback for all other ISO codes)
这用于保存十六进制数字字符等字符
关于java - 为什么 struts 资源包具有 myresource.properties 和 myresource_en.properties 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5510438/