List of usage examples for com.liferay.portal.kernel.language LanguageUtil get
public static String get(ResourceBundle resourceBundle, String key)
From source file:com.liferay.portlet.configuration.sharing.web.internal.portlet.configuration.icon.FacebookPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { ResourceBundle resourceBundle = ResourceBundleUtil.getBundle("content.Language", getLocale(portletRequest), getClass());//w ww . j a v a 2 s .co m return LanguageUtil.get(resourceBundle, "add-to-facebook"); }
From source file:com.liferay.portlet.configuration.sharing.web.internal.portlet.configuration.icon.IGooglePortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { ResourceBundle resourceBundle = ResourceBundleUtil.getBundle("content.Language", getLocale(portletRequest), getClass());// w ww .ja va2s. c o m return LanguageUtil.get(resourceBundle, "add-to-an-open-social-platform"); }
From source file:com.liferay.portlet.configuration.sharing.web.internal.portlet.configuration.icon.NetvibesPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { ResourceBundle resourceBundle = ResourceBundleUtil.getBundle("content.Language", getLocale(portletRequest), getClass());/*from w ww . ja va 2 s .c om*/ return LanguageUtil.get(resourceBundle, "add-to-netvibes"); }
From source file:com.liferay.portlet.configuration.sharing.web.internal.portlet.configuration.icon.WidgetPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { ResourceBundle resourceBundle = ResourceBundleUtil.getBundle("content.Language", getLocale(portletRequest), getClass());//from www . j a v a 2s . co m return LanguageUtil.get(resourceBundle, "add-to-any-website"); }
From source file:com.liferay.portlet.configuration.web.internal.portlet.configuration.icon.ConfigurationTemplatesPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); return LanguageUtil.get(themeDisplay.getLocale(), "configuration-templates"); }
From source file:com.liferay.portlet.currencyconverter.util.CurrencyUtil.java
License:Open Source License
public static Map<String, String> getAllSymbols(PageContext pageContext) { HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); Locale locale = request.getLocale(); String key = locale.toString(); Map<String, String> symbols = _symbolsPool.get(key); if (symbols != null) { return symbols; }//from w w w .ja v a2s . co m symbols = new TreeMap<String, String>(); Iterator<String> itr = _instance._currencyIds.iterator(); while (itr.hasNext()) { String symbol = itr.next(); symbols.put(LanguageUtil.get(pageContext, symbol), symbol); } _symbolsPool.put(key, symbols); return symbols; }
From source file:com.liferay.portlet.display.template.web.internal.dynamic.data.mapping.util.PortletDisplayTemplateDDMDisplay.java
License:Open Source License
@Override public String getViewTemplatesTitle(DDMStructure structure, boolean controlPanel, boolean search, Locale locale) {// w w w . ja v a 2s. co m if (search) { return LanguageUtil.get(locale, "templates"); } if (controlPanel) { return StringPool.BLANK; } return super.getViewTemplatesTitle(structure, controlPanel, search, locale); }
From source file:com.liferay.portlet.display.template.web.internal.dynamic.data.mapping.util.PortletDisplayTemplateDDMDisplay.java
License:Open Source License
@Override protected String getDefaultEditTemplateTitle(Locale locale) { return LanguageUtil.get(locale, "new-application-display-template"); }
From source file:com.liferay.portlet.display.template.web.internal.dynamic.data.mapping.util.PortletDisplayTemplateDDMDisplay.java
License:Open Source License
@Override protected String getDefaultViewTemplateTitle(Locale locale) { return LanguageUtil.get(locale, "application-display-templates"); }
From source file:com.liferay.portlet.documentlibrary.util.DLImpl.java
License:Open Source License
@Override public Map<String, String> getEmailDefinitionTerms(PortletRequest portletRequest, String emailFromAddress, String emailFromName) {//from w ww . j av a2 s. co m ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); Map<String, String> definitionTerms = new LinkedHashMap<>(); definitionTerms.put("[$COMPANY_ID$]", LanguageUtil.get(themeDisplay.getLocale(), "the-company-id-associated-with-the-document")); definitionTerms.put("[$COMPANY_MX$]", LanguageUtil.get(themeDisplay.getLocale(), "the-company-mx-associated-with-the-document")); definitionTerms.put("[$COMPANY_NAME$]", LanguageUtil.get(themeDisplay.getLocale(), "the-company-name-associated-with-the-document")); definitionTerms.put("[$DOCUMENT_TITLE$]", LanguageUtil.get(themeDisplay.getLocale(), "the-document-title")); definitionTerms.put("[$DOCUMENT_TYPE$]", LanguageUtil.get(themeDisplay.getLocale(), "the-document-type")); definitionTerms.put("[$DOCUMENT_URL$]", LanguageUtil.get(themeDisplay.getLocale(), "the-document-url")); definitionTerms.put("[$DOCUMENT_USER_ADDRESS$]", LanguageUtil.get(themeDisplay.getLocale(), "the-email-address-of-the-user-who-added-the-document")); definitionTerms.put("[$DOCUMENT_USER_NAME$]", LanguageUtil.get(themeDisplay.getLocale(), "the-user-who-added-the-document")); definitionTerms.put("[$FOLDER_NAME$]", LanguageUtil.get(themeDisplay.getLocale(), "the-folder-in-which-the-document-has-been-added")); definitionTerms.put("[$FROM_ADDRESS$]", HtmlUtil.escape(emailFromAddress)); definitionTerms.put("[$FROM_NAME$]", HtmlUtil.escape(emailFromName)); Company company = themeDisplay.getCompany(); definitionTerms.put("[$PORTAL_URL$]", company.getVirtualHostname()); PortletDisplay portletDisplay = themeDisplay.getPortletDisplay(); definitionTerms.put("[$PORTLET_NAME$]", HtmlUtil.escape(portletDisplay.getTitle())); definitionTerms.put("[$SITE_NAME$]", LanguageUtil.get(themeDisplay.getLocale(), "the-site-name-associated-with-the-document")); definitionTerms.put("[$TO_ADDRESS$]", LanguageUtil.get(themeDisplay.getLocale(), "the-address-of-the-email-recipient")); definitionTerms.put("[$TO_NAME$]", LanguageUtil.get(themeDisplay.getLocale(), "the-name-of-the-email-recipient")); return definitionTerms; }