Replaces all variables of the specified language value.

<p>
Variables:
<ul>
<li>${servePath}</li>
<li>${staticServePath}</li>
</ul>
</p>

@param langValue the specified language value
@return replaced value
507492
private String replaceVars(final String langValue) {
        String ret = StringUtils.replace(langValue, "${servePath}", Latkes.getServePath());
        ret = StringUtils.replace(ret, "${staticServePath}", Latkes.getStaticServePath());

        return ret;
    }
1008738
public Map<String, String> getAll(final Locale locale) {
        Map<String, String> ret = LANGS.get(locale);
        if (null == ret) {
            ret = new HashMap<>();
            final ResourceBundle defaultLangBundle = ResourceBundle.getBundle(Keys.LANGUAGE, Latkes.getLocale());
            final Enumeration<String> defaultLangKeys = defaultLangBundle.getKeys();
            while (defaultLangKeys.hasMoreElements()) {
                final String key = defaultLangKeys.nextElement();
                final String value = replaceVars(defaultLangBundle.getString(key));

                ret.put(key, value);
            }

            final ResourceBundle langBundle = ResourceBundle.getBundle(Keys.LANGUAGE, locale);
            final Enumeration<String> langKeys = langBundle.getKeys();
            while (langKeys.hasMoreElements()) {
                final String key = langKeys.nextElement();
                final String value = replaceVars(langBundle.getString(key));

                ret.put(key, value);
            }

            LANGS.put(locale, ret);
        }

        return ret;
    }
1352910
public SoapFault locale(String locale) {
        LocaleEditor localeEditor = new LocaleEditor();
        localeEditor.setAsText(locale);
        this.locale = (Locale) localeEditor.getValue();
        return this;
    }
1241443
public static Object getElValue(JspContext context, String elName) {
        VariableResolver variableResolver = context.getVariableResolver();
        Object var = null;
        try {
            elName = TagUtils.getElName(elName);
            var    = variableResolver.resolveVariable(elName);
            logger.debug("ExpressionLanguage variable {} is [{}]", elName, var);
        } catch (ELException e) {
            logger.error("ExpressionLanguage Error", e);
        }

        return var;
    }
425775
public Object setProperty(String key, LangAlt value) {
		return super.setProperty(key, value.toString());
	 }
629783
@Override
    public void setValue(org.openprovenance.prov.model.LangString value) {
        this.value = value;
    }
1096725
public static Locale parseLocaleString(String locale) {
		String lang = GeneralUtils.isEmpty(locale) ? "pt" : locale.substring(0, 2);
		String country = GeneralUtils.isEmpty(locale) ? "" : locale.substring(3, 5);
		return new Locale(lang, country);
	}
955907
private static Locale strip(Locale locale) {
        String language = locale.getLanguage();
        String country = locale.getCountry();
        String variant = locale.getVariant();
        if (!variant.isEmpty()) {
            variant = "";
        } else if (!country.isEmpty()) {
            country = "";
        } else if (!language.isEmpty()) {
            language = "";
        } else {
            return null;
        }
        return new Locale(language, country, variant);
    }
408313
@Override
  public final void setLang(final Languages pLang) {
    this.lang = pLang;
    if (this.itsId == null) {
      this.itsId = new IdI18nUnitOfMeasure();
    }
    this.itsId.setLang(this.lang);
  }
1045031
public static String getLocalDisplayName(String locale) {
		String desc = "" + locale;
		if (locale != null) {
			String[] langArray = locale.split("_");
	        Locale loc = null;
	        if (langArray.length == 1) {
	            loc = new Locale(langArray[0]);
	        } else if (langArray.length == 2) {
	            loc = new Locale(langArray[0], langArray[1]);
	        } else if (langArray.length == 3) {
	            loc = new Locale(langArray[0], langArray[1], langArray[2]);
	        }
	        if (loc != null) {
	        	desc = loc.getDisplayLanguage(loc);
	        }
		}
		return desc;
	}
341380
public void setFillTranslateAnchor(@Property.FILL_TRANSLATE_ANCHOR String value) {
    PropertyValue propertyValue = fillTranslateAnchor(value);
    constantPropertyUsageMap.put(PROPERTY_FILL_TRANSLATE_ANCHOR, propertyValue);
    layer.setProperties(propertyValue);
  }
371182
public void setLang(java.lang.String lang) {
        getStateHelper().put(PropertyKeys.lang, lang);
        handleAttribute("lang", lang);
    }
54369
public static Locale convertLanguageToLocale(final String planguage) {
    final Locale locale;
    if (planguage == null) {
      locale = null;
    } else {
      final String localeStringUp = planguage.toUpperCase().replace('-', '_');
      if (LocaleUtil.DEFAULT_MAP.containsKey(localeStringUp)) {
        locale = LocaleUtil.DEFAULT_MAP.get(localeStringUp);
      } else if (localeStringUp.contains("_")) {
        final String[] lcoaleSplitted = localeStringUp.split("_");
        if (lcoaleSplitted.length > 2) {
          locale =
              new Locale(lcoaleSplitted[0].toLowerCase(), lcoaleSplitted[1], lcoaleSplitted[2]);
        } else {
          locale = new Locale(lcoaleSplitted[0].toLowerCase(), lcoaleSplitted[1]);
        }
      } else {
        locale = new Locale(planguage);
      }
    }
    return locale;
  }
1162212
private String localize(String key, String defaultValue) {
    String result = defaultValue;
    if (bundle != null) {
      try {
        result = bundle.getString(key);
      }
      catch (MissingResourceException mre) {
      }
    }
    return result;
  }
1197165
private static String getLocalizedValues(final String locale, final List<?> items) {
        val foundLocale = findLocale(StringUtils.defaultString(locale, "en"), items);
        if (foundLocale.isPresent()) {
            return foundLocale.get();
        }

        if (!items.isEmpty()) {
            val item = items.get(0);
            var value = StringUtils.EMPTY;
            if (item instanceof LocalizedName) {
                value = ((LocalizedName) item).getValue();
            }
            if (item instanceof LocalizedURI) {
                value = ((LocalizedURI) item).getValue();
            }
            if (item instanceof XSString) {
                value = ((XSString) item).getValue();
            }
            LOGGER.trace("Loading first available locale [{}]", value);
            return value;
        }
        return null;
    }
858341
private void removeValuesInOtherLocales(String elementPath, Locale sourceLocale) {

        for (Locale locale : getLocales()) {
            if (locale.equals(sourceLocale)) {
                continue;
            }
            while (hasValue(elementPath, locale)) {
                removeValue(elementPath, locale, 0);
            }
        }
    }
302026
public static final Function<Number,String> toCurrencyStr(Locale locale) {
        return new ToString(NumberFormatType.CURRENCY, locale);
    }