How to set value of field with localization using jquery in UI extensions for English and French

I have UI extension which is using jquery for displaying country names and codes. I have to use localization for that. currently it is displaying names in English but I also want to display names in English. it is set like this.
What if I want to bind french country names and that should be display in field Country Name
ā€“ French.

Any idea guys

Iā€™m not entirely sure what exactly you are asking for, but if you are looking to set the localized value for a field, you just need to add the locale as the second argument to the setValue function like this (assuming en-US is a valid locale in your space):

entry.fields.countryName.setValue(countryName, 'en-US');

does that help?

1 Like