Package org.jboss.errai.ui.client.local.spi

Examples of org.jboss.errai.ui.client.local.spi.TranslationService


   * Get all locales that your application supports, all the bundles that you have provided.
   * @return supported locales
   */
  public Collection<Locale> getSupportedLocales() {
    Set<Locale> supportedLocales = new HashSet<Locale>();
    final TranslationService translationService = TemplateUtil.getTranslationService();
    final Collection<String> locales = translationService.getSupportedLocales();
    for (String localeKey : locales) {
      localeKey = localeKey == null ? DEFAULT : localeKey;
      supportedLocales.add(new Locale(localeKey, translationService.getTranslation(localeKey)));
    }

    return supportedLocales;
  }
View Full Code Here


  public static final String DEFAULT = "default";

  public Collection<Locale> getSupportedLocales() {
    Set<Locale> supportedLocales = new HashSet<Locale>();
    final TranslationService translationService = TemplateUtil.getTranslationService();
    final Collection<String> locales = translationService.getSupportedLocales();
    for (String localeKey : locales) {
      localeKey = localeKey == null ? DEFAULT : localeKey;
      supportedLocales.add(new Locale(localeKey, translationService.getTranslation(localeKey)));
    }

    return supportedLocales;
  }
View Full Code Here

   * Get all locales that your application supports, all the bundles that you have provided.
   * @return supported locales
   */
  public Collection<Locale> getSupportedLocales() {
    Set<Locale> supportedLocales = new HashSet<Locale>();
    final TranslationService translationService = TemplateUtil.getTranslationService();
    final Collection<String> locales = translationService.getSupportedLocales();
    for (String localeKey : locales) {
      localeKey = localeKey == null ? DEFAULT : localeKey;
      supportedLocales.add(new Locale(localeKey, translationService.getTranslation(localeKey)));
    }

    return supportedLocales;
  }
View Full Code Here

TOP

Related Classes of org.jboss.errai.ui.client.local.spi.TranslationService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.