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.wiki.web.internal.item.selector.view.WikiAttachmentItemSelectorView.java
License:Open Source License
@Override public String getTitle(Locale locale) { return LanguageUtil.get(locale, "page-attachments"); }
From source file:com.liferay.wiki.web.internal.portlet.configuration.icon.AddChildPagePortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), "add-child-page"); }
From source file:com.liferay.wiki.web.internal.portlet.configuration.icon.CopyPagePortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), "copy"); }
From source file:com.liferay.wiki.web.internal.portlet.configuration.icon.ImportPagesPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), "import-pages"); }
From source file:com.liferay.wiki.web.internal.portlet.configuration.icon.NodeSubscriptionPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { String key = "subscribe"; try {// w ww . ja v a 2s. c o m WikiNode node = ActionUtil.getNode(portletRequest); if (isSubscribed(portletRequest, node)) { key = "unsubscribe"; } } catch (Exception e) { } return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), key); }
From source file:com.liferay.wiki.web.internal.portlet.configuration.icon.PageSubscriptionPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { String key = "subscribe"; try {//from ww w . ja v a2 s. c o m WikiPage page = ActionUtil.getPage(portletRequest); if (isSubscribed(portletRequest, page)) { key = "unsubscribe"; } } catch (Exception e) { } return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), key); }
From source file:com.liferay.wiki.web.internal.portlet.configuration.icon.PermissionsPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), "wikis-permissions"); }
From source file:com.liferay.wiki.web.internal.portlet.configuration.icon.ViewNodeDeletedAttachmentsPortletConfigurationIcon.java
License:Open Source License
@Override public String getMessage(PortletRequest portletRequest) { return LanguageUtil.get(getResourceBundle(getLocale(portletRequest)), "view-removed-attachments"); }
From source file:com.liferay.wiki.web.internal.portlet.template.WikiPortletDisplayTemplateHandler.java
License:Open Source License
@Override public String getName(Locale locale) { ResourceBundle resourceBundle = ResourceBundleUtil.getBundle("content.Language", locale, getClass()); String portletTitle = PortalUtil.getPortletTitle(WikiPortletKeys.WIKI, resourceBundle); return portletTitle.concat(StringPool.SPACE).concat(LanguageUtil.get(locale, "template")); }
From source file:com.liferay.wiki.web.internal.portlet.toolbar.item.WikiPortletToolbarContributor.java
License:Open Source License
protected void addPortletTitleMenuItem(List<MenuItem> menuItems, WikiNode node, ThemeDisplay themeDisplay, PortletRequest portletRequest) throws PortalException { if (!containsPermission(themeDisplay.getPermissionChecker(), themeDisplay.getScopeGroupId(), node.getNodeId(), ActionKeys.ADD_PAGE)) { return;// w w w . j av a 2 s.c o m } URLMenuItem urlMenuItem = new URLMenuItem(); urlMenuItem.setIcon("icon-plus-sign-2"); urlMenuItem.setLabel(LanguageUtil.get(PortalUtil.getHttpServletRequest(portletRequest), "add-page")); PortletDisplay portletDisplay = themeDisplay.getPortletDisplay(); PortletURL portletURL = PortletURLFactoryUtil.create(portletRequest, portletDisplay.getId(), PortletRequest.RENDER_PHASE); portletURL.setParameter("mvcRenderCommandName", "/wiki/edit_page"); portletURL.setParameter("redirect", PortalUtil.getCurrentURL(portletRequest)); portletURL.setParameter("nodeId", String.valueOf(node.getNodeId())); portletURL.setParameter("title", StringPool.BLANK); portletURL.setParameter("editTitle", "1"); urlMenuItem.setURL(portletURL.toString()); menuItems.add(urlMenuItem); }