S
Swetha
Hello
I am using Resource Bundles in a Swing application. I have a method
that requests the appropriate resource bundle based on the current
locale.
public ResourceBundle getPPBundle()
{
logger.log(Level.INFO, "locale is " + loc.toString());
PPBundle = ResourceBundle.getBundle("PP", loc);
logger.log(Level.INFO, "locale is " +
PPBundle.getLocale().toString());
return PPBundle;
}
As shown above : loc is of type Locale and when I print its value, it
shows "ar" in this case. I have 2 properties files : PP.properties(the
default) and PP_ar.properties(the arabic properties file). However when
I execute the code, the ResourceBundle locale is blank ("") when
printed and the string returned is in the default language instead of
in Arabic.
The same code worked some time back, and I can't seem to figure out
what has changed to change the behavior.
Can someone think of a reason??
Thanks
Swetha
I am using Resource Bundles in a Swing application. I have a method
that requests the appropriate resource bundle based on the current
locale.
public ResourceBundle getPPBundle()
{
logger.log(Level.INFO, "locale is " + loc.toString());
PPBundle = ResourceBundle.getBundle("PP", loc);
logger.log(Level.INFO, "locale is " +
PPBundle.getLocale().toString());
return PPBundle;
}
As shown above : loc is of type Locale and when I print its value, it
shows "ar" in this case. I have 2 properties files : PP.properties(the
default) and PP_ar.properties(the arabic properties file). However when
I execute the code, the ResourceBundle locale is blank ("") when
printed and the string returned is in the default language instead of
in Arabic.
The same code worked some time back, and I can't seem to figure out
what has changed to change the behavior.
Can someone think of a reason??
Thanks
Swetha