Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is possible to implement columns with multilingual capabilities ? #96

Open
icarrara opened this issue Dec 19, 2019 · 3 comments
Open
Assignees

Comments

@icarrara
Copy link

icarrara commented Dec 19, 2019

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.

@yasuflatland-lf
Copy link
Owner

@icarrara Let me look into this. If this can be done only by taglib and no backend modification is necessary, this could be added as a template.

@yasuflatland-lf yasuflatland-lf self-assigned this Jan 8, 2020
@yasuflatland-lf
Copy link
Owner

@icarrara
Copy link
Author

@yasuflatland-lf I saw that localized fileds was changed so we need backend motification, right ?

Do you think that it is still possible to implement localized fileds in Damascus ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants