@Test public void locale_split() { assertEquals(LocalizationSetterImpl.stripTerm("foo_bar_Baz"), "foo_bar"); assertEquals(LocalizationSetterImpl.stripTerm("foo_bar"), "foo"); assertEquals(LocalizationSetterImpl.stripTerm("foo"), ""); }
static String stripTerm(String localeName) { int scorex = localeName.lastIndexOf('_'); return scorex < 0 ? "" : localeName.substring(0, scorex); }
LocalizationSetterImpl implements LocalizationSetter { static String stripTerm(String localeName) { int scorex = localeName.lastIndexOf('_'); return scorex < 0 ? "" : localeName.substring(0, scorex); } }
LocalizationSetterImpl implements LocalizationSetter { static String stripTerm(String localeName) { int scorex = localeName.lastIndexOf('_'); return scorex < 0 ? "" : localeName.substring(0, scorex); } LocalizationSetterImpl(Request request,

    PersistentLocale persistentLocale,

    ThreadLocale threadLocale,

    @Symbol(SymbolConstants.SUPPORTED_LOCALES)
    String localeNames); }
LocalizationSetterImpl implements LocalizationSetter { static String stripTerm(String localeName) { int scorex = localeName.lastIndexOf('_'); return scorex < 0 ? "" : localeName.substring(0, scorex); } 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 { static String stripTerm(String localeName) { int scorex = localeName.lastIndexOf('_'); return scorex < 0 ? "" : localeName.substring(0, scorex); } 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();  }