Gets the language code from a given locale. @param locale A locale. @return A string in the format of 'XX-XX'.
(Locale locale)
| 335 | * @return A string in the format of 'XX-XX'. |
| 336 | */ |
| 337 | public static String getLanguageCode(Locale locale) { |
| 338 | return String.format("%s-%s", locale.getLanguage(), locale.getCountry()); |
| 339 | } |
| 340 | |
| 341 | /** |
| 342 | * Base64 encodes a given byte array. |
no test coverage detected