on ‎2018 Dec 06 12:29 PM
Hi, We have define localization for String attributes in Item.xml as below
localized:java.lang.String
But we don't do such things in Populators or Converters. Because of that, only English values are converted from Item Model to Item Data
How can we populate all the languages values of an attribute in populators or converters?
Thanks,
Vinod.
Request clarification before answering.
use the functions on the model with the locale parameter to get the localized name
public String getName(final Locale loc)
if populating to the frontend usually one language is set in the context and this is shown to the user. If you want to display a text in different languages at the same time you require different fields in the populated object model like nameEn, nameDe, nameFr etc. (or via a map)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.