LocaleOrNone - MessageManager
[jalview.git] / src / jalview / util / MessageManager.java
index 823fcc3..880252e 100644 (file)
@@ -56,9 +56,13 @@ public class MessageManager
     try
     {
       /* Getting messages for GV */
+      // BH 2020.0-6.05 using new Locale("") to avoid unnecessary check for "en"
+      // here; works in Java as well, but not implementing that.
       log.info("Getting messages for lang: " + loc);
       Control control = Control.getControl(Control.FORMAT_PROPERTIES);
-      rb = ResourceBundle.getBundle("lang.Messages", loc, control);
+      rb = ResourceBundle.getBundle("lang.Messages",
+              Platform.getLocaleOrNone(loc),
+              control);
       // if (log.isLoggable(Level.FINEST))
       // {
       // // this might take a while, so we only do it if it will be shown