cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
KoenJanssensPD
Post Patron
Post Patron

Localizable fields on (custom) entities?

Hi all,

 

Is it still not possible to have localizable fields on custom entities? (see Enabling fields for field translation - Microsoft Dynamics CRM Forum Community Forum)

I have a custom table "Categories" of which I want to localize the record entries for the fields "Name" and "Description"...

 

Is there any other convenient way to localize fields so they follow the UI language?

 

Thanks,

Koen

1 ACCEPTED SOLUTION

Accepted Solutions

OK, well with that constraint, this can at least be custom built because Lookup and Optionsets labels are, in a way, arbitrary.

 

Using formscript, you can input a label that doesn't correspond to the underlying value. For a lookup you might set the correct type and ID, but stick in any label you want and DV will still consider it to be the correct underlying record, and likewise for optionsets. So, you could have a table of translations somewhere out there and have formscript that onLoad looks to that table to translate optionsets and lookups, then updates each of them with their correct value, but this overridden label. Then, because technically you've now made these fields, "dirty" you then hit each one with a setSubmitMode Never and add an onChange event to refresh the label swap and set the submit mode back to Dirty just in case the user actually does intend to change the value.

 

Caveat: this will only hit the way fields display on the form, and won't impact the lookup experience or the dropdown selection experience. To impact those, I think you would need to build a custom PCF to override the behavior.

View solution in original post

6 REPLIES 6
cchannon
Super User
Super User

Are you referring to field values or field labels?

 

Localizing field values does have some pretty serious limitations (not surprising; that is a tough challenge!), but the field labels have been localizable for a very, very long time. Customize labels to support multiple languages (Microsoft Dataverse) - Power Apps | Microsoft Docs

Hi ,

I do mean field values, like it seems to be possible to have translations for the field product.name ...

I know it is a challenge, but I thought, if it can be done for some fields, it should be possible for others as well...

Yeah, no great answer to that one. Localization of values is a big challenge, largely because many of the values you'd want to translate are sentence fragments and this is difficult for translation models to handle because they rely on word embeddings--context

 

There are lots of ways this is a problem for translation models, but just consider the simplest one: homonyms. English is particularly egregious here, but other languages have plenty of homonyms of their own and distinguishing them is incredibly difficult from a sentence fragment, even if a human can look at the fragment and know immediately which is the correct interpretation.

 

Example: you build an app for a cryptocurrency expert and add a field "Notes" to one of their tables. They type "mined target" into their notes. Does that mean that they:

  1. Generated encryption keys for new bitcoin up to the threshold they intended,
  2. Dug into the earth to find a substance called "target", or
  3. Buried explosive ordinance around a giant bullseye pained on the ground

Sadly, while to a human this is obvious, to a ML model that only has those two words to go on, the meaning could be any of the above, so when translated the result becomes arbitrary.

KoenJanssensPD
Post Patron
Post Patron

Hi @cchannon ,

I think you took it a bit too far for what I am looking for; I am not looking into automatic translation of text fields.

I am looking for a way to have for example the field "Category Name" that holds the english names for each category record; Now I want to have some way the user can add the translations for that field for other (predefined) languages. For example "Category Name (French)" , "Category Name (German)",... 

In a simplistic approach, I could just add those additional columns as custom fields, showing all those fields next to each other in the apps... However, it would be much nicer that the appropriate language column is shown depending on the UI language...

OK, well with that constraint, this can at least be custom built because Lookup and Optionsets labels are, in a way, arbitrary.

 

Using formscript, you can input a label that doesn't correspond to the underlying value. For a lookup you might set the correct type and ID, but stick in any label you want and DV will still consider it to be the correct underlying record, and likewise for optionsets. So, you could have a table of translations somewhere out there and have formscript that onLoad looks to that table to translate optionsets and lookups, then updates each of them with their correct value, but this overridden label. Then, because technically you've now made these fields, "dirty" you then hit each one with a setSubmitMode Never and add an onChange event to refresh the label swap and set the submit mode back to Dirty just in case the user actually does intend to change the value.

 

Caveat: this will only hit the way fields display on the form, and won't impact the lookup experience or the dropdown selection experience. To impact those, I think you would need to build a custom PCF to override the behavior.

HemantG
Power Apps
Power Apps

Good inputs @cchannon .

 

@KoenJanssensPD  also look at Localization API component - Power Apps | Microsoft Docs and Web Resouces localization capabilities and evaluate them for the scenario fit. 

 

Thanks,

Hemant 

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (2,394)