@Test public void testGetResourceBundleFallbackOnLanguage() throws Exception { String locale = "en_GB"; ResourceBundle resourceBundle = ComponentUtil.getCurrentResourceBundle(locale); Assert.assertEquals("en", resourceBundle.getLocale().toString().toLowerCase()); }
public static ResourceBundle getCurrentResourceBundle(String locale) { try { if (null != locale && !locale.isEmpty()) { return getCurrentResourceBundle(LocaleUtils.toLocale(locale)); } } catch (IllegalArgumentException ex) { } return getCurrentResourceBundle((Locale) null); }
ComponentUtil { public static ResourceBundle getCurrentResourceBundle(String locale) { try { if (null != locale && !locale.isEmpty()) { return getCurrentResourceBundle(LocaleUtils.toLocale(locale)); } } catch (IllegalArgumentException ex) { } return getCurrentResourceBundle((Locale) null); } }
ComponentUtil { public static ResourceBundle getCurrentResourceBundle(String locale) { try { if (null != locale && !locale.isEmpty()) { return getCurrentResourceBundle(LocaleUtils.toLocale(locale)); } } catch (IllegalArgumentException ex) { } return getCurrentResourceBundle((Locale) null); } private  ComponentUtil(); }
ComponentUtil { public static ResourceBundle getCurrentResourceBundle(String locale) { try { if (null != locale && !locale.isEmpty()) { return getCurrentResourceBundle(LocaleUtils.toLocale(locale)); } } catch (IllegalArgumentException ex) { } return getCurrentResourceBundle((Locale) null); } private  ComponentUtil(); static ResourceBundle getCurrentResourceBundle(String locale); static ResourceBundle getCurrentResourceBundle(Locale locale); }
ComponentUtil { public static ResourceBundle getCurrentResourceBundle(String locale) { try { if (null != locale && !locale.isEmpty()) { return getCurrentResourceBundle(LocaleUtils.toLocale(locale)); } } catch (IllegalArgumentException ex) { } return getCurrentResourceBundle((Locale) null); } private  ComponentUtil(); static ResourceBundle getCurrentResourceBundle(String locale); static ResourceBundle getCurrentResourceBundle(Locale locale);  }