@Test public void set_nonpersistent_locale() { PersistentLocale pl = mockPersistentLocale(); ThreadLocale tl = mockThreadLocale(); Request request = mockRequest(); tl.setLocale(Locale.FRENCH); replay(); LocalizationSetterImpl setter = new LocalizationSetterImpl(request, pl, tl, "en,fr"); setter.setNonPersistentLocaleFromLocaleName("fr_BE"); verify(); }
public void setNonPersistentLocaleFromLocaleName(String localeName) { Locale requested = toLocale(localeName); Locale supported = findClosestSupportedLocale(requested); threadLocale.setLocale(supported); }
LocalizationSetterImpl implements LocalizationSetter { public void setNonPersistentLocaleFromLocaleName(String localeName) { Locale requested = toLocale(localeName); Locale supported = findClosestSupportedLocale(requested); threadLocale.setLocale(supported); } }
LocalizationSetterImpl implements LocalizationSetter { public void setNonPersistentLocaleFromLocaleName(String localeName) { Locale requested = toLocale(localeName); Locale supported = findClosestSupportedLocale(requested); threadLocale.setLocale(supported); } LocalizationSetterImpl(Request request,

    PersistentLocale persistentLocale,

    ThreadLocale threadLocale,

    @Symbol(SymbolConstants.SUPPORTED_LOCALES)
    String localeNames); }
LocalizationSetterImpl implements LocalizationSetter { public void setNonPersistentLocaleFromLocaleName(String localeName) { Locale requested = toLocale(localeName); Locale supported = findClosestSupportedLocale(requested); threadLocale.setLocale(supported); } LocalizationSetterImpl(Request request,

    PersistentLocale persistentLocale,

    ThreadLocale threadLocale,

    @Symbol(SymbolConstants.SUPPORTED_LOCALES)
    String localeNames); Locale toLocale(String localeName); boolean setLocaleFromLocaleName(String localeName); void setNonPersistentLocaleFromLocaleName(String localeName); List<Locale> getSupportedLocales(); boolean isSupportedLocaleName(String localeName); SelectModel getSupportedLocalesModel(); }
LocalizationSetterImpl implements LocalizationSetter { public void setNonPersistentLocaleFromLocaleName(String localeName) { Locale requested = toLocale(localeName); Locale supported = findClosestSupportedLocale(requested); threadLocale.setLocale(supported); } LocalizationSetterImpl(Request request,

    PersistentLocale persistentLocale,

    ThreadLocale threadLocale,

    @Symbol(SymbolConstants.SUPPORTED_LOCALES)
    String localeNames); Locale toLocale(String localeName); boolean setLocaleFromLocaleName(String localeName); void setNonPersistentLocaleFromLocaleName(String localeName); List<Locale> getSupportedLocales(); boolean isSupportedLocaleName(String localeName); SelectModel getSupportedLocalesModel();  }