Hi!
I am developing a multilingual application on
tomcat 4.1 + WSAD 5.1.1.
I am using a class file for fetching the labels by setting the locale.
here's the method that i'm using:
public
String getLabel(String str_lang,String str_cn,String int_lang_id)throws java.util.MissingResourceException
{
String msg= null;
try
{
//this local variable is for getting the language string from file
Strings_lang = null;
//this local variable is for getting the country string from file
Strings_cn = null;
if (str_lang==null) {
s_lang=new String("en");
s_cn=new String("JP");
} else {
s_lang=new String(str_lang);
s_cn=new String(str_cn);
}
Locale currentLocale = new Locale(s_lang, s_cn);
ResourceBundle messages = ResourceBundle.getBundle("GHDS",currentLocale);
System.out.println("BEFORE");
msg = messages.getString(int_lang_id).trim();
System.out.println("msg"+msg);
} //end of try
catch(Exception se)
{
System.out.println("File could not be Found--->"+se);
}
return msg; //RETURNS THE LABEL
}//end of function
The name of my properties file is GHDS_en_JP.properties
I'm getting a run time error that says "File could not be Found--->java.util.MissingResourceException: Can't find bundle for base name GHDS, locale en_JP"
could you kindly help me out on this.