Fórumok
Languages in Portlets not only with properties
Deniz Burucu, módosítva 8 év-val korábban
Languages in Portlets not only with properties
New Member Bejegyzések: 10 Csatlakozás dátuma: 2015.06.10. Legújabb bejegyzések
Hello,
My portlet should be multi-language-portlet. Not only for buttons. The content in the database must be multi-language, too.
How can I create multilanguage columns in my portlet like in the table journalarticle column title:
How can I do that?
Is there an example portlet with multi-language content?
My portlet should be multi-language-portlet. Not only for buttons. The content in the database must be multi-language, too.
How can I create multilanguage columns in my portlet like in the table journalarticle column title:
<!--?xml version='1.0' encoding='UTF-8'?--><root available-locales="en_US,de_DE,es_ES," default-locale="en_US"><title language-id="en_US">Welcome</title><title language-id="de_DE">WelcomeDE</title><title language-id="es_ES">WelcomeES</title></root>
How can I do that?
Is there an example portlet with multi-language content?
Harish Kumar, módosítva 8 év-val korábban
RE: Languages in Portlets not only with properties
Expert Bejegyzések: 483 Csatlakozás dátuma: 2010.07.31. Legújabb bejegyzések
Hi
Yes, you can create multi language support for your custom portlet table columns.
column should be declared in service.xml like this.
On JSP
Hope this helps
Yes, you can create multi language support for your custom portlet table columns.
column should be declared in service.xml like this.
<column name="name" type="String" localized="true" />
On JSP
<liferay-ui:input-localized type="textarea" defaultLanguageId="<%= LocaleUtil.toLanguageId(themeDisplay.getLocale()) %>" name="name" xml="<%=name%>" />
Hope this helps
Deniz Burucu, módosítva 8 év-val korábban
RE: Languages in Portlets not only with properties
New Member Bejegyzések: 10 Csatlakozás dátuma: 2015.06.10. Legújabb bejegyzések
thank you Harish Kumar.
I added localized="true" in my columns.
how can I get it in my jsf / xhtml with primefaces? Its possible?:
I tested it with:
but its not working.
I added localized="true" in my columns.
how can I get it in my jsf / xhtml with primefaces? Its possible?:
<p:inputtext tabindex="1" id="description" value="#{typeOfCallEditController.getCurrentEntity().description}" required="true" label="#{i18n['description']}">
</p:inputtext>
I tested it with:
<liferay-ui:input-localized id="description" type="textarea" defaultLanguageId="en" name="description" xml="" />
but its not working.
David H Nebinger, módosítva 8 év-val korábban
RE: Languages in Portlets not only with properties
Liferay Legend Bejegyzések: 14919 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Primefaces will not have the same kind of i18n support in it that <liferay-ui:input-localized /> has.
Basically the liferay piece will look up in the XML the appropriate value to use based on the user's locale. Any change to that value will represent an update only for the locale of the user.
PF won't do that for you, from PF's perspective description is just a simple string to display in the input.
Your test fails because of numerous errors in your arguments. Use the example provided by Harish as an example.
Basically the liferay piece will look up in the XML the appropriate value to use based on the user's locale. Any change to that value will represent an update only for the locale of the user.
PF won't do that for you, from PF's perspective description is just a simple string to display in the input.
Your test fails because of numerous errors in your arguments. Use the example provided by Harish as an example.
Kyle Joseph Stiemann, módosítva 8 év-val korábban
RE: Languages in Portlets not only with properties
Liferay Master Bejegyzések: 760 Csatlakozás dátuma: 2013.01.14. Legújabb bejegyzések
Hi Deniz,
liferay-ui:input-localized is not a JSF component, so it will not work in a JSF portlet. Our Localizing JSF Portlets article should be able to answer your questions.
- Kyle
liferay-ui:input-localized is not a JSF component, so it will not work in a JSF portlet. Our Localizing JSF Portlets article should be able to answer your questions.
- Kyle
Deniz Burucu, módosítva 8 év-val korábban
RE: Languages in Portlets not only with properties
New Member Bejegyzések: 10 Csatlakozás dátuma: 2015.06.10. Legújabb bejegyzések
Hi Kyle,
your article is only for i18n-Variables.
How would I use internationalization in table contents in JSF?
Can you give me an example?
I want to show and edit the contents in defined languages.
I need in JSF input fields, that show me the column in the language to edit this.
your article is only for i18n-Variables.
How would I use internationalization in table contents in JSF?
Can you give me an example?
I want to show and edit the contents in defined languages.
I need in JSF input fields, that show me the column in the language to edit this.
Neil Griffin, módosítva 8 év-val korábban
RE: Languages in Portlets not only with properties
Liferay Legend Bejegyzések: 2655 Csatlakozás dátuma: 2005.07.27. Legújabb bejegyzések
Kyle Joseph Stiemann, módosítva 8 év-val korábban