Java – How should I implement a dropdown box which contains a list of items which need to be shown in different languages


I'm trying to design a form which contains a dropdown box containing a list of grocery item choices.

What criteria should I look at when trying to decide on whether to use a java enum or a lookup table? Also, I will need to plan ahead for i18n support for the dropdown strings.

Best Solution

Use a Property Resource Bundle. They are designed for situations like this where you have to add i18n support.

Remember to think about sorting/ordering. Will the list be shown in the same order for all languages? Or sorted alphabetically according to the locale?