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

后端 未结 2 682
清酒与你
清酒与你 2021-01-22 12:50

I don\'t know anything about internationalization.

I have a project with several packages. I am using Eclipse\'s built-in \"Externalize Strings\" wizard to extract Strin

相关标签:
2条回答
  • 2021-01-22 13:16

    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.

    0 讨论(0)
  • 2021-01-22 13:18

    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.

    0 讨论(0)
提交回复
热议问题