- Common ways to obtain OgemaLocale
private void myMethod () {OgemaLocale o =
OgemaHttpRequest ogemaHttpRequest;ogemaHttpRequest.getLocale()
- Smart code suggestions by Codota
}
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; }
public String getLanguage() { return getLocale().getLanguage(); }
/** * Override in derived class if necessary * @return Browser path to Icon */ public String getIcon() { return BASE_PATH + "/" + correctIconCode(getLocale().getLanguage().toUpperCase()) + ".png"; }
@Override public JSONObject retrieveGETData(OgemaHttpRequest req) { updateOnGET(req.getLocale().getLocale()); return super.retrieveGETData(req); }
@Override public JSONObject retrieveGETData(OgemaHttpRequest req) { updateOnGET(req.getLocale().getLocale()); return super.retrieveGETData(req); }
@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); }
OgemaLocale locale = OgemaLocale.getLocale(lang); if (locale == null) {