How can one store an Image in a ListResourceBundle in order to provide different images for different locales?

Vjekoslav Nesek Nesek

One method is to save your localized images in a .jar, as, say, image-fr.gif for french and image.gif as default. Then you can reference the image file name from ResourceBundles for each locale. For example in MyResource.properties:

myImage = image.gif

and in MyResources_fr.properties:

myImage = image-fr.gif

Then reference the desired image by the key myImage and you will obtain the correct file name for each locale.

Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact