mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-11-20 10:09:25 +00:00
Reload locale even if it is set to null.
This commit is contained in:
parent
363aee70d5
commit
04666b66b4
1 changed files with 14 additions and 15 deletions
|
@ -123,10 +123,8 @@ public class I18n implements net.ess3.api.II18n
|
||||||
|
|
||||||
public void updateLocale(final String loc)
|
public void updateLocale(final String loc)
|
||||||
{
|
{
|
||||||
if (loc == null || loc.isEmpty())
|
if (loc != null && !loc.isEmpty())
|
||||||
{
|
{
|
||||||
return;
|
|
||||||
}
|
|
||||||
final String[] parts = loc.split("[_\\.]");
|
final String[] parts = loc.split("[_\\.]");
|
||||||
if (parts.length == 1)
|
if (parts.length == 1)
|
||||||
{
|
{
|
||||||
|
@ -140,6 +138,7 @@ public class I18n implements net.ess3.api.II18n
|
||||||
{
|
{
|
||||||
currentLocale = new Locale(parts[0], parts[1], parts[2]);
|
currentLocale = new Locale(parts[0], parts[1], parts[2]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ResourceBundle.clearCache();
|
ResourceBundle.clearCache();
|
||||||
messageFormatCache = new HashMap<String, MessageFormat>();
|
messageFormatCache = new HashMap<String, MessageFormat>();
|
||||||
Logger.getLogger("Essentials").log(Level.INFO, String.format("Using locale %s", currentLocale.toString()));
|
Logger.getLogger("Essentials").log(Level.INFO, String.format("Using locale %s", currentLocale.toString()));
|
||||||
|
|
Loading…
Reference in a new issue