cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how localize is done in Populator or Convertor?

Former Member
0 Likes
480

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.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member624549
Participant
0 Likes

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)