/** * Returns the localized resource string for a given message key according to the configured resource bundle * of this content handler.<p> * * If the key was not found in the configured bundle, or no bundle is configured for this * content handler, the return value is * <code>"??? " + keyName + " ???"</code>.<p> * * @param keyName the key for the desired string * @param locale the locale to get the key from * * @return the resource string for the given key * * @see CmsMessages#formatUnknownKey(String) * @see CmsMessages#isUnknownKey(String) */ protected String key(String keyName, Locale locale) { CmsMessages messages = getMessages(locale); if (messages != null) { return messages.key(keyName); } return CmsMessages.formatUnknownKey(keyName); }
/** * Returns the localized resource string for a given message key according to the configured resource bundle * of this content handler.<p> * * If the key was not found in the configured bundle, or no bundle is configured for this * content handler, the return value is * <code>"??? " + keyName + " ???"</code>.<p> * * @param keyName the key for the desired string * @param locale the locale to get the key from * * @return the resource string for the given key * * @see CmsMessages#formatUnknownKey(String) * @see CmsMessages#isUnknownKey(String) */ protected String key(String keyName, Locale locale) { CmsMessages messages = getMessages(locale); if (messages != null) { return messages.key(keyName); } return CmsMessages.formatUnknownKey(keyName); }
getMessages(OpenCms.getWorkplaceManager().getWorkplaceLocale(cms))).setAdditionalMacros(additionalValues);
getMessages(cms.getRequestContext().getLocale())).setAdditionalMacros(additionalValues);
if (!m_nonMacroResolvableDefaults.contains(path)) { CmsMacroResolver resolver = CmsMacroResolver.newInstance().setCmsObject(newCms).setMessages( getMessages(locale)); result = resolver.resolveMacros(defaultValue);
getMessages(locale)); return resolver.resolveMacros(defaultValue);