public final class LocaleUtils extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getTranslationFromLocaleMap(PreferredLocales preferredLocales,
Map<Locale,String> translations)
Using the user's preferred locales (for example, from the "Accept-Language" header in the HTTP context),
select the most optimal (string) translation from the map.
|
public static String getTranslationFromLocaleMap(PreferredLocales preferredLocales, Map<Locale,String> translations)
preferredLocales
- the preferred localestranslations
- Map of locales to stringsIllegalArgumentException
- If an acceptable string cannot be foundCopyright © 2010-2018, ForgeRock All Rights Reserved.