Tabnine Logo
de.iwes.widgets.api.widgets.localisation
Code IndexAdd Tabnine to your IDE (free)

How to use de.iwes.widgets.api.widgets.localisation

Best Java code snippets using de.iwes.widgets.api.widgets.localisation (Showing top 12 results out of 315)

origin: org.ogema.widgets/ogema-gui-api

public OgemaLocale getLocale() { // initialized only when needed; not synchronized, but should be irrelevant
  if (locale == null) {
    locale = OgemaLocale.getLocale(localeString);
    if (locale == null)
      locale = OgemaLocale.ENGLISH;
  }
  return locale;
}
 
origin: org.ogema.widgets/ogema-gui-api

public JSONObject getJson() {
  return getJson(Locale.ENGLISH);
}
 
origin: org.ogema.widgets/ogema-gui-api

public static void registerLocale(OgemaLocale locale) {
  locales.put(locale.getLanguage(), locale);
}
 
origin: org.ogema.widgets/ogema-js-bundle

Set<OgemaLocale> locales = OgemaLocale.getAllLocales();
Iterator<OgemaLocale> it = locales.iterator();
int counter = 0;
  counter++;
  OgemaLocale loc = it.next();
  JSONObject langObj = loc.getJson(inLocale);
  langObj.put("selected", loc.getLanguage().equals(locl));
  langObj.put("value", counter);
  languages.put(langObj);
origin: org.ogema.widgets/ogema-gui-api

/**
 * Override in derived class if necessary
 * @return Browser path to Icon
 */
public String getIcon() {
  return BASE_PATH + "/" + correctIconCode(getLocale().getLanguage().toUpperCase()) + ".png";
}
 
origin: org.ogema.widgets/ogema-js-bundle

  @Override
  public WidgetPageBase<S> run() {
    try {
      T object = clazz.getConstructor().newInstance();
      String code = object.getLocale().getLanguage();
      dicts.put(code, object);
    } catch (NoSuchMethodException e) {
      LoggerFactory.getLogger(JsBundleApp.class).error("Class {} does not provide a public default constructor.",clazz);
    } catch (Exception e) {
      LoggerFactory.getLogger(JsBundleApp.class).error("Could not register locale {}: {}",clazz,e);
    }
    return WidgetPageBase.this;
  }
});
origin: org.ogema.widgets/ogema-gui-api

public JSONObject getJson(Locale inLocale) {
  JSONObject obj = new JSONObject();
  obj.put("text", locale.getLanguage());
  obj.put("imageSrc", getIcon());
  obj.put("description", locale.getDisplayLanguage(inLocale));
  return obj;
}
 
origin: org.ogema.widgets/ogema-gui-api

public String getLanguage() {
  return getLocale().getLanguage();
}
 
origin: org.ogema.widgets/widget-extended

@Override
public JSONObject retrieveGETData(OgemaHttpRequest req) {
  updateOnGET(req.getLocale().getLocale());
  return super.retrieveGETData(req);
}
 
origin: org.ogema.widgets/widget-extended

@Override
public JSONObject retrieveGETData(OgemaHttpRequest req) {
  updateOnGET(req.getLocale().getLocale());
  return super.retrieveGETData(req);
}
 
origin: org.ogema.widgets/widget-extended

@SuppressWarnings("unchecked")
@Override
public JSONObject retrieveGETData(OgemaHttpRequest req) {
  String newValue;
  if (selectedResource == null)
    newValue = ((ResourceLabel<?>) widget).getEmptyLabel(req.getLocale().getLocale()) ;
  else
    newValue = ((ResourceLabel<T>) widget).format(selectedResource, req.getLocale().getLocale());
  super.setText(newValue);
  return super.retrieveGETData(req);
}
origin: org.ogema.widgets/ogema-js-bundle

OgemaLocale locale = OgemaLocale.getLocale(lang);
if (locale == null) {
de.iwes.widgets.api.widgets.localisation

Most used classes

  • OgemaLocale
    Contains an ordinary Locale, plus an icon path and some static methods to retrieve available locales
  • LocaleDictionary
    Provides localisation information. Each dictionary class must have a public constructor without arg
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now