Mirko Romstadt 3 Years Ago Hi David, Thanks for your blog post, this helped us a lot! You wrote: "There's no built-in persistence support for the localization maps, so I also have to persist these manually" Maybe this has changed since the latest service builder, but we got a "updateMyEntityLocalizations(MyEntity, Map<String, String> ...)" method generated by the service builder. So no need for us to implement this manually. The only problem that we had is that the maps we got from the frontend are of type Map<Locale, String>, like: Map<Locale, String> titleMap = LocalizationUtil.getLocalizationMap(actionRequest, "titleMapAsXML"); So we had to convert this map into Map<String, String> to use the generated update localizations method via: private Map<String, String> toStringMap(Map<Locale, String> localeMap) { Map<String, String> stringMap = new HashMap<>(); localeMap.forEach((locale, string) -> { if (string != null && !"".equals(string)) { stringMap.put(locale.toString(), string); } }); return stringMap; } Is there a reason these two map types differ? Has the method changed to get the localization map from the request? Do we miss something here? Greetings, Mirko Please sign in to reply. Reply as... Cancel David H Nebinger Mirko Romstadt 3 Years Ago Wouldn't be the first time Liferay changed code on me ;-) Is there a reason they differ? Well, none that I can think of. Perhaps report a ticket on issues.liferay.com and it might get resolved? Please sign in to reply. Reply as... Cancel Mirko Romstadt David H Nebinger 3 Years Ago Alright, will do so :) Thanks! Please sign in to reply. Reply as... Cancel
David H Nebinger Mirko Romstadt 3 Years Ago Wouldn't be the first time Liferay changed code on me ;-) Is there a reason they differ? Well, none that I can think of. Perhaps report a ticket on issues.liferay.com and it might get resolved? Please sign in to reply. Reply as... Cancel Mirko Romstadt David H Nebinger 3 Years Ago Alright, will do so :) Thanks! Please sign in to reply. Reply as... Cancel
Mirko Romstadt David H Nebinger 3 Years Ago Alright, will do so :) Thanks! Please sign in to reply. Reply as... Cancel
mehdi heidarzadeh 2 Years Ago - Edited Hi David Thanks for the great article. About challenges, you have mentioned for setting localized="true" for localized fields, if there are use cases that do not have those challenges like, small blobs, or not having complex queries, can we still use localized="true" for localized fields or just we have to use new feature <localized-entity> and Liferay might deprecate localized="true" in future?because using <localized-entity> also has challenges of adding a new localized table in the database for each entity and adding about 12 extra java files for each <localized-entity> and making CRUD services more complex and manual. Please sign in to reply. Reply as... Cancel