(final String locale, final String key)
| 84 | } |
| 85 | |
| 86 | public static String getSpecific(final String locale, final String key) { |
| 87 | Properties properties = LOCALES.get(locale); |
| 88 | if (properties == null) { |
| 89 | properties = LOCALES.get(DEFAULT_LOCALE); |
| 90 | } |
| 91 | String value = properties.getProperty(key); |
| 92 | if (value == null) { |
| 93 | value = LOCALES.get(DEFAULT_LOCALE).getProperty(key); |
| 94 | } |
| 95 | if (value == null) { |
| 96 | return "Missing translation for key: " + key; |
| 97 | } |
| 98 | return value; |
| 99 | } |
| 100 | |
| 101 | public static String getCurrentLocale() { |
| 102 | return currentLocale; |
no test coverage detected