Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

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

0
Posted

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

0

Location: http://www.jguru.com/faq/view.jsp?EID=222272 Created: Oct 4, 2000 Modified: 2000-10-04 20:24:22.125 Author: Vjekoslav Nesek Nesek (http://www.jguru.com/guru/viewbio.jsp?EID=132836) Question originally posed by Jasen Halmes (http://www.jguru.com/guru/viewbio.jsp?EID=55625 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.

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123