Pages

Wednesday, April 29, 2015

How to handle localized resources with resource bundle

Generally, there are 2 ways to handle localized resources.
1. Append the locale name to the end of the file name. eg, logo_en_US.jpg, flag_zh_CN.png
2. Save the resources of the locale to individual resource bundle.

Solution 1 is kind of straight forward,

thus, in this post, we will be focusing on Solution 2.

Normally, in java development, we have different resource bundle to handle localized messages, labels for different locales.