I do not think there is a universal “best way”. I tried Googling for a “best practice” recommendation and found nothing that said how to best structure the property namespace for i18n.
(I found this somewhat unexpected. Usually there is someone who is willing to put their imprudent opinions to something like this as “best practice.” Or maybe I'm too cynical.)
FWIW, my general advice is:
- be systematic and consistent with respect to property names and property file structure.
- don't be afraid to use resource package inheritance if there is a lot of duplication,
- if the property files or resource packages become too large, separate them.
But I expect that you already know and will do it all.
Finally, don’t get too focused on getting it “right.” There is no perfect solution, and what you are doing now is probably good enough ... according to the criteria of the one who pays you to do this work.
source share