Examples of Locale


Examples of org.jboss.errai.ui.shared.api.Locale

    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

Examples of org.jibx.ws.example.headers.common.Locale

     * @param inCtx inbound message context
     * @param outCtx outbound message context
     * @return welcome message
     */
    public Welcome welcomeService(Greetee greeetee, InContext inCtx, OutContext outCtx) {
        Locale locale = (Locale) inCtx.getAttribute("example.locale");
        QOS qos = null;
        String greeting = "Hi";
        if (locale != null) {
            if (locale.getLanguage().equals("en")) {
                greeting = "Hello";
                qos = new QOS(8, "OK");
            } else if (locale.getLanguage().equals("fr")) {
                greeting = "Bonjour";
                qos = new QOS(9, "Très bon");
            }
        }
        outCtx.setAttribute("comm.qos", qos);
View Full Code Here

Examples of org.jibx.ws.example.headers.common.Locale

        m_fact = BindingDirectory.getFactory(Greetee.class);
    }

    private Welcome sayHello(Greetee s) throws WsException, IOException {
        SoapClient client = new SoapClient(m_location, m_fact);
        client.addOutHeader(new Locale("fr"));
        UnmarshallingInHandler headerHandler = new UnmarshallingInHandler(QOS.class);
        client.addInHeaderHandler(headerHandler);
        Welcome welcome = (Welcome) client.call(s);
        System.out.println("QOS: " + headerHandler.getPayload());
        return welcome;
View Full Code Here

Examples of org.zanata.rest.editor.dto.Locale

        List<Locale> localesRefs =
                Lists.newArrayListWithExpectedSize(locales.size());

        for (HLocale hLocale : locales) {
            localesRefs.add(new Locale(hLocale.getLocaleId(),
                    hLocale.retrieveDisplayName()));
        }

        Type genericType = new GenericType<List<Locale>>() {
        }.getGenericType();
View Full Code Here

Examples of org.zanata.webtrans.shared.model.Locale

     *
     * @param index
     * @return the locale at the given index, null if no locale is associated
     */
    public Locale getLocale(int index) {
        Locale locale = locales.get(index);
        if (locale == null) {
            return null;
        } else {
            return locales.get(index);
        }
View Full Code Here

Examples of zendeskapi.models.locales.Locale

    Assert.assertTrue(API.getLocales().getCurrentLocale().getLocale().getId() > 0);
  }
 
  @Test
  public void testLocaleById() throws Exception {
    Locale locale = API.getLocales().getAllLocales().getLocales().get(0);
    Assert.assertTrue(API.getLocales().getLocaleById(locale.getId()).getLocale().getId() > 0);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.