Convenience method for retrieving an Integer resource.

@param locale locale identifier
@param key resource key
@return resource value
490555
public static final Integer getInteger(Locale locale, String key)
   {
      ResourceBundle bundle = ResourceBundle.getBundle(LocaleData.class.getName(), locale);
      return ((Integer) bundle.getObject(key));
   }
463269
public function get(string $key, string $locale = null)
    {
        list($country) = $this->parseKey($key);

        $locale = $locale ?? $this->fallbackLocale;

        $this->load($locale);

        if ($this->has($locale, $country)) {
            return $this->loaded[$locale][$country];
        }

        return $key;
    }
440917
@GET
    @Path("/{key}")
    @Produces(MediaType.APPLICATION_JSON)
    @RequiresPermissions(I18nPermissions.TRANSLATION_READ)
    public TranslationRepresentation getTranslation(@PathParam("key") String key) {
        TranslationRepresentation translation = translationFinder.findTranslation(locale, key);
        if (translation == null) {
            throw new NotFoundException("No translation for key: " + key + " and locale: " + locale);
        }
        return translation;
    }
831298
public Resource getResource(String name, Locale locale, String encoding) throws IOException {
        name = UrlUtils.cleanName(name);
        locale = cleanLocale(locale);
        return loadResource(name, locale, encoding);
    }
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;
    }
182267
public String key(Locale locale) {

        if (getBundle() == null) {
            return getKey();
        }
        return getBundle().getBundle(locale).key(getKey(), getArgs());
    }
1013091
public String getLabel(JKLocale locale, final String key, final Object... params) {
		if (key == null || key.trim().equals("")) {
			return "";
		}
		String newKey = JKCollectionUtil.fixPropertyKey(key);
		Properties prop = getLables(locale);
		if (prop.containsValue(newKey)) {
			// to avoid calling the values as keys
			return newKey;
		}
		String value = prop.getProperty(newKey);
//		System.out.println(prop);
		// Fix the string only if not found
		if (value == null || value.equals("")) {
			value = newKey;
			// }
			// if (!value.equals("")) {
			value = fixValue(value);
			// to avoid printing the error statement again
			setProperty(locale, key, value);
		}
		return setParamsters(value, params);
	}
1130118
@HtmlSafe
    public String getText(String key)
    {
		String text = super.getText(key);

		if (text.equals(key))
		{
			text = I18nUtil.getText(key, getResourceBundle());
		}

		return text;
    }
165554
public function get($key, $locale = null)
    {
        if(!$locale){
            $locale = $this->getLocale();
        }

        if($locale == config('translator.default')){
            return $key;
        }

        $this->load($locale);

        if (!isset($this->languages[$locale][$key])){
            $this->setMissing($key, $locale);
            return $key;
        }

        return $this->languages[$locale][$key]["value"];
    }
814886
public function get($key, $locale = null)
    {
        return $this->translator->get("log-viewer::levels.$key", [], $locale ?: $this->getLocale());
    }
1147852
function getLocale (key) {
    var locale;

    if (key && key._locale && key._locale._abbr) {
        key = key._locale._abbr;
    }

    if (!key) {
        return globalLocale;
    }

    if (!isArray$2(key)) {
        //short-circuit everything else
        locale = loadLocale(key);
        if (locale) {
            return locale;
        }
        key = [key];
    }

    return chooseLocale(key);
}
777354
public String getMessage(final Locale locale, final String key, final String defaultValue) {
        String message = getMessage(locale, key);
        return message == null ? defaultValue : message;
    }
818518
public int getInteger(String key) throws MissingResourceException {
        String result = getString(key);
        try {
            return Integer.parseInt(result);
        } catch (NumberFormatException nfe) {
            if (tc.isEventEnabled()) {
                Tr.event(tc, "Unable to parse " + result + " as Integer.");
            }
            // DGH20040823: Begin fix for defect 218797 - Source provided by Tom Musta
            // String msg = messages.getString("NLS.integerParseError",
            //                                 "Unable to parse as integer.");
            String msg = getMessages().getString("NLS.integerParseError",
                                                 "Unable to parse as integer.");
            // DGH20040823: End fix for defect 218797 - Source provided by Tom Musta
            throw new MissingResourceException(msg, bundleName, key);
        }
    }
1114214
public <T> T getField(String locale, String key) {
    return localize(locale).getField(key);
  }
174553
@Override
	public Resource getResource(String key)
	{

		Resource resource = new ClasspathResource(key, this.getChildPath(root, key), this);
		return resource;
	}
993290
MessageResource loadResource(final Locale locale) {

        if(locale == null) {
            return defaultResource;
        }

        if(resources.containsKey(locale)) {
            return resources.get(locale);
        }

        MessageResource localeResource = null;
        synchronized (resources) {
            for(String path : getPropertyPath(locale)) {

                try {
                    final Properties props = new Properties();
                    props.load(new InputStreamReader(MessageResolver.class.getResourceAsStream(path), "UTF-8"));

                    localeResource = new MessageResource();

                    final Enumeration<?> keys = props.propertyNames();
                    while(keys.hasMoreElements()) {
                        String key = (String) keys.nextElement();
                        String value = props.getProperty(key);
                        localeResource.addMessage(key, value);
                    }

                    // ユーザのリソースの読み込み
                    if(appendUserResource) {
                        localeResource.addMessage(loadUserResource(path));
                    }

                    break;

                } catch(NullPointerException | IOException e) {
                    continue;
                }

            }

            if(localeResource == null) {
                // 該当するリソースが見つからない場合は、デフォルトの値を返す。
                localeResource = defaultResource;
            }

            resources.put(locale, localeResource);
        }

        return localeResource;

    }
863565
public static function get($key, $default = null, $locale = null)
    {
        return self::all($locale)->get($key, $default);
    }