Java i18n: use one ResourceBundle accessor per package, or one for whole project?

喜夏-厌秋 提交于 2019-12-02 00:05:06

I'm in favor of a global localization file. You will have duplicate keys ("OK", "Cancel") which would require duplication or nesting, and interfacing with outside localization people is easier if the resources are consolidated.

I would keep one-per-package. This way maintenance/refactoring/unit-testing is much easier.

Also, there are no global dependencies on a single file.

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