hello all, I am working on the internationalization of a big project. can anybody tell me where should I put the .properties files so that the program can find them and what should I name them exactly.
Iam receiving the following exception: java.util.MissingResourceException: Can't find bundle for base name MessagesBundle, locale fr_MOR
The files should be in the classpath. I think that the error message states that a file called "MessagesBundle_fr_MOR.properties" is missing. It's unusual to have a three-letter country designation like "MOR"; usually that should only be two letters.
Originally posted by Ulf Dittmer: The files should be in the classpath. I think that the error message states that a file called "MessagesBundle_fr_MOR.properties" is missing.
Either that, or
MessagesBundle_fr.properties
or
MessagesBundle.properties
If I remember correctly, you can even have all three, and a key will be searched in all of them, from most specific to more general.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Guessing that aymane chetibi meant "Morocco" ("Maroc" in French), the country designation is "ma". So the locale would be "fr_MA". But I find it a little surprising that the ResourceBundle code itself is looking for "fr_MOR"; perhaps the underlying code has a locale constructed in the same way.
aymane chetibi
Ranch Hand
Joined: Apr 12, 2006
Posts: 175
posted
0
yes I meant Morocco. I changed it before I saw your message to fr_MR and still got the same error. java.util.MissingResourceException: Can't find bundle for base name MessagesBundle, locale fr_MR
do I have to have three files ? I want to have 2 languages, english and french. and do I have to have the country designation of can I have just MessagesBundle_fr.properties?
Also, how can I check if they are in the class path ?