I have an application that i wan't to translate into several languages, by now its only in swedish. I have never done this before.
I am using a Properties file to store my text. I wan't to select languages with a combo box but i don't know the procedure after
the selection has been made. How do you update an application after you have selected another language? Do you restart the
application and how do I accomplish that?
This is how a load my Properties file. The method load(Locale loc) resides in a class called "Localizer"
And this is how I wan't to select each language:
And also, what is the best way to load a Properties file and where? Im trying to load the Properties file at the top of my appliacaion,
but it is not working well. Is there a certain guideline for this? Sorry for all the bombardment of questions in this post, but I'm
very in to the subject at the moment.
Joe Ess wrote:Have a look at this tutorial. You don't manage the property files themselves. You set a Locale and let Java determine what properties are correct.
Best, Mr Ess!
Sorry for a late reply. I know how ResourceBundles work in theory but not in the "real world" so to speak. I am trying to
learn how to internationalize a program and how to "reload" ResourceBundles or Properties object. It's so difficult for me to
get a grasp on. My goal is to have an actionlistener that let the user select languages from a group of JMenuItems.
This is driving me crazy. I realize the solution must be simple, but i am blinded at the moment of confusion. I would be very
glad if anyone could help me out here. I have read the tutorial on localization but i get stuck when it comes down
to the practical part.
Very kind regards,
What a show! What atmosphere! What fun! What a tiny ad!