- Allow you to optionally reload the global messages bundle when changing your locale
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@6538 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -95,9 +95,24 @@ public class MessageManager
|
||||
* manager will use the new locale. The message bundle cache will also be cleared.
|
||||
*/
|
||||
public void setLocale (Locale locale)
|
||||
{
|
||||
setLocale(locale, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the locale to the specified locale. Subsequent message bundles fetched via the message
|
||||
* manager will use the new locale. The message bundle cache will also be cleared.
|
||||
*
|
||||
* @param updateGlobal set to true if you want the global bundle reloaded in the new locale
|
||||
*/
|
||||
public void setLocale (Locale locale, boolean updateGlobal)
|
||||
{
|
||||
_locale = locale;
|
||||
_cache.clear();
|
||||
|
||||
if (updateGlobal) {
|
||||
_global = getBundle(GLOBAL_BUNDLE);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user