Foros de discusión

Multilingual Structure Names

Joan Fluvia, modificado hace 9 años.

Multilingual Structure Names

New Member Mensajes: 13 Fecha de incorporación: 6/11/13 Mensajes recientes
When creating a structure you can change the label with this:

<dynamic-element name="Forum" type="boolean" index-type="" repeatable="false">
	<meta-data>
		<entry name="displayAsTooltip">false</entry>
		<entry name="required">false</entry>
		<entry name="instructions"></entry>
		<entry name="label">Forum anzeigen</entry>
		<entry name="predefinedValue"></entry>
	</meta-data>
</dynamic-element>


But can you put multiple labels depending on the language (English, Spanish, German,...) ? Using lang or locale, something like...

<entry name="label" lang="es_ES">Mostrar Foro</entry>
<entry name="label" lang="en_US">Show Forum</entry>
<entry name="label" lang="de_DE">Forum anzeigen</entry>


And what about list elements where metadata is not working?

<dynamic-element name="Order" type="list" index-type="" repeatable="false">
	<meta-data>
		<entry name="label">Ordnen nach</entry>	
	</meta-data>
	<dynamic-element name="Datum" type="1" index-type="" repeatable="false"></dynamic-element>
	<dynamic-element name="Kommentare" type="2" index-type="" repeatable="false"></dynamic-element>
	<dynamic-element name="Likes" type="3" index-type="" repeatable="false" />
</dynamic-element>


How can cange Date, Comments and Likes depending on the locale?
thumbnail
Zsigmond Rab, modificado hace 9 años.

RE: Multilingual Structure Names

Liferay Master Mensajes: 727 Fecha de incorporación: 5/01/10 Mensajes recientes
Hi Joan,

do you mean to change those from some custom code? Have you checked how the portal is doing that in its source?

Regards,
Zsigmond
Joan Fluvia, modificado hace 9 años.

RE: Multilingual Structure Names

New Member Mensajes: 13 Fecha de incorporación: 6/11/13 Mensajes recientes
Yes, sorry if I didn't explained well. I mean when you go to Web Contents -> Structure and create a new Structure and you want to make the fields multilingual.

I did some research and found this:

<meta-data locale="en_Us">
	<entry name="label">Company</entry>
</meta-data>
meta-data locale="es_Es"&gt;
	<entry name="label">Compañía</entry>


Monday I will check it at work. But still I need some way to do the same with list labels. When you do a dropdown menu, for example "Choose your gender": and a dropdown menu: "Male / Female", how to make it "Hombre / Mujer" in Spanish.