Returns the localized message described by this container for the given locale.<p>

@param locale the locale to use
@return the localized message described by this container for the given locale
182267
public String key(Locale locale) {

        if (getBundle() == null) {
            return getKey();
        }
        return getBundle().getBundle(locale).key(getKey(), getArgs());
    }
1171849
public ConfigurableMessages getConfigurableMessages(CmsMessages defaultMessages, Locale locale) {

        return new ConfigurableMessages(defaultMessages, locale, m_configuredBundle);

    }
1201702
public String getTitle(Locale locale)
   {
      String result = null;

      if (m_title != null)
      {
         result = m_title;
      }
      else
      {
         if (m_fieldType != null)
         {
            result = m_project.getCustomFields().getCustomField(m_fieldType).getAlias();
            if (result == null)
            {
               result = m_fieldType.getName(locale);
            }
         }
      }

      return (result);
   }
473604
private Locale getLocale(FacesContext context) {

        // PENDING(craigmcc) - JSTL localization context?
        Locale locale = this.locale;
        if (locale == null) {
            locale = context.getViewRoot().getLocale();
        }
        return (locale);

    }
1107442
@Override
    public Locale getLocale() {
        if (null == this.locales) {
            this.locales = connection.getEncodingUtils().getLocales(this.request.getHeader("Accept-Language"));
        }
        if (this.locales.isEmpty()) {
            return null;
        }
        return this.locales.get(0);
    }
826476
protected function getLocale($locale)
    {
        $result = null;
        if ($locale instanceof LocaleEntity) {
            $result = $locale;
        } elseif (is_string($locale) && $locale !== '') {
            $result = $this->app->make(LocaleRepository::class)->findApproved($locale);
        }

        return $result;
    }
1092631
public Locale getElementLocale() {

        if (m_elementLocale == null) {
            if (CmsStringUtil.isNotEmpty(getParamElementlanguage()) && !"null".equals(getParamElementlanguage())) {
                m_elementLocale = CmsLocaleManager.getLocale(getParamElementlanguage());
            } else {
                initElementLanguage();
                m_elementLocale = CmsLocaleManager.getLocale(getParamElementlanguage());
            }
        }
        return m_elementLocale;
    }
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;
    }
640772
public String get(final String key, final Locale locale) {
        return get(Keys.LANGUAGE, key, locale);
    }
210258
public String getLocalizedMessage() {
  		Formatter f = new Formatter();
		f.format(m_defaultMessage, m_arguments);
        return f.toString();
    }
245268
public static Locale getLocaleFromString(String locale) throws LocaleException {
		for(Locale l : Locale.getAvailableLocales()) {
			if(locale.toLowerCase().equals(l.toString().toLowerCase())) {
				return l;
			}
		}
		throw new LocaleException();
	}
1195516
public static String getMessage(String key, Locale locale) {

        ResourceBundle bundle = null;
        try {
            bundle = CmsResourceBundleLoader.getBundle("org.opencms.inactiveusers.custom", locale);
            return bundle.getString(key);
        } catch (MissingResourceException e) {
            LOG.info("Customization bundle not found: org.opencms.inactiveusers.custom", e);
            bundle = CmsResourceBundleLoader.getBundle("org.opencms.ui.messages", locale);
            return bundle.getString(key);
        }
    }
238249
@GET
    @Path("/{locale}")
    @Produces(MediaType.APPLICATION_JSON)
    public Response getTranslations(@PathParam("locale") String locale) {
        Map<String, String> messages = getMessages(locale);
        if (!messages.isEmpty()) {
			return Response.ok(messages).build();
		}
        return Response.ok("{}").build();
    }
192784
protected MessageFormat createMessageFormat(String msg, Locale locale) {
        return new MessageFormat((msg != null ? msg : ""), locale);
    }
312377
public String getMessage(Locale locale) {
		if (getCause() != null) {
			String message = getShortMessage(locale) + ", " + translate("ROOT_CAUSE", locale) + " ";
			if (getCause() instanceof GeomajasException) {
				return message + ((GeomajasException) getCause()).getMessage(locale);
			}
			return message + getCause().getMessage();
		} else {
			return getShortMessage(locale);
		}
	}
1009411
public String getLocaleName(final Locale locale) {
        return messageResolver.getMessage(locale, String.format("color.%d.name", index));
    }
805426
public String toHtml(Locale locale) {

        CmsMessages mg = Messages.get().getBundle(locale);
        if (m_brokenLinks.size() > 0) {
            StringBuffer result = new StringBuffer(1024);
            Iterator<Entry<String, String>> brokenLinks = m_brokenLinks.entrySet().iterator();
            result.append(mg.key(Messages.GUI_LINK_VALIDATION_RESULTS_INTRO_1, new Object[] {m_validationDate})).append(
                "<ul>");
            while (brokenLinks.hasNext()) {
                Entry<String, String> link = brokenLinks.next();
                String linkPath = link.getKey();
                String linkUrl = link.getValue();
                String msg = mg.key(Messages.GUI_LINK_POINTING_TO_2, new Object[] {linkPath, linkUrl});
                result.append("<li>").append(msg).append("</li>");
            }
            return result.append("</ul>").toString();
        } else {
            return mg.key(Messages.GUI_LINK_VALIDATION_RESULTS_ALL_VALID_1, new Object[] {m_validationDate});
        }
    }