public static Locale getLocale() { Locale rtn = threadLocales.get(); if ( rtn != null ) { return rtn; } setLocale( langChoice.getDefaultLocale() ); return langChoice.getDefaultLocale(); }
/** * Returns a {@link LinkedHashSet} of {@link Locale}s for consideration when localizing text. The * {@link LinkedHashSet} contains the user selected preferred {@link Locale}, the failover {@link Locale} * ({@link Locale#ENGLISH}) and the {@link Locale#ROOT}. * * @return Returns a {@link LinkedHashSet} of {@link Locale}s for consideration when translating text */ public static LinkedHashSet<Locale> getActiveLocales() { // Use a LinkedHashSet to maintain order final LinkedHashSet<Locale> activeLocales = new LinkedHashSet<>(); // Example: messages_fr_FR.properties activeLocales.add( langChoice.getDefaultLocale() ); // Example: messages_en_US.properties activeLocales.add( FAILOVER_LOCALE ); // Example: messages.properties activeLocales.add( Locale.ROOT ); return activeLocales; }
continue; String name = per.getDisplayName( LanguageChoice.getInstance().getDefaultLocale() ); PerspectiveData perspectiveData = new PerspectiveData( name, per.getId() ); if ( Arrays.asList( defaultDisabled ).contains( per.getId() ) ) {
addLineToBuilder( stepTree, LanguageChoice.getInstance().getDefaultLocale() ); final StringBuilder stepCountPerCategory = new StringBuilder(); addLineToBuilder( stepCountPerCategory, LanguageChoice.getInstance().getDefaultLocale() );
LanguageChoice.getInstance().getDefaultLocale().toString(), GlobalMessages.localeCodes ); if ( idxDefault >= 0 ) { wDefaultLocale.select( idxDefault );