You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Liferay portal, Varchar and RichText columns may have multilingual capabilities.
To define a multilingual column, in ServiceBuilder we need for example: <column name="description" type="String" localized="true" />
If you want to access the above column from jsp page, you have to write: <%= LanguageUtil.get(pageContext,"description") %>
If you want to access the above column from controller, you have to write: PortletConfig portletConfig = (PortletConfig) portletRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG); String description = LanguageUtil.get(portletConfig, locale, key);
where:
locale = themeDisplay.getLocale()
key = the key which you have defined in Language.property file.
Question/Request: To manage in Damascus columns with multilingual capabilities, it is possible to implement a new property in Varchar and RichText fields as below and manage it?
In Liferay portal, Varchar and RichText columns may have multilingual capabilities.
To define a multilingual column, in ServiceBuilder we need for example:
<column name="description" type="String" localized="true" />
If you want to access the above column from jsp page, you have to write:
<%= LanguageUtil.get(pageContext,"description") %>
If you want to access the above column from controller, you have to write:
PortletConfig portletConfig = (PortletConfig) portletRequest.getAttribute(JavaConstants.JAVAX_PORTLET_CONFIG);
String description = LanguageUtil.get(portletConfig, locale, key);
where:
locale = themeDisplay.getLocale()
key = the key which you have defined in Language.property file.
Question/Request: To manage in Damascus columns with multilingual capabilities, it is possible to implement a new property in Varchar and RichText fields as below and manage it?
{ "type": "com.liferay.damascus.cli.json.fields.Varchar", "name": "title", "title": "Title", "length": "80", "showFieldInView": "true", "required": "true", "localized": "true" }
Thank you for comments.
The text was updated successfully, but these errors were encountered: