Translating userdata in dropdowns

0
I'm looking for some inspiriation/feedback on an idea I had to translate userdata. Our app has Dutch and Polish users and we would like to show some userdata in either Dutch or Polish/English (depending on type of data).   I looked around a bit and found that Mendix can't do this out of the box. I found one possible solution: community.mendix.com/link/space/ui-&-front-end/questions/122897   However I had the following idea: I've created 3 fields: NameNL, NameEN and DisplayName. The DisplayName field is setup as Calculated. I then created a microflow which retrieves the user language and returns either NameNL or NameEN (for polish users). NameNL or NameEN is required when creating the object.   Is this a good solution? Would this also be useable in grids? if so: How would you solve filtering on this value? What is the performance impact of such implementation? The grid I would like to use it in has around 5000 records currently and is expected to grow by about 2000 per year.
asked
2 answers
0

Would this also be useable in grids? if so: How would you solve filtering on this value? What is the performance impact of such implementation? The grid I would like to use it in has around 5000 records currently and is expected to grow by about 2000 per year.

 

I found this to be bad design. I chose to retrieve the user language instead and show a grid based on the user language with the correct fields in it. I can then use the field for this specific users language in the datagrid filters

answered
0

I would opt for a structure like this

image.png

Each TranslatedEntity Object can be linked to a defined language in your App.

In your logic, you can compare the language linked to the user and fetch the correct TranslatedEntity/TranslatedText.  If this cannot be found you could have the MainEntity as fallback (or you enforce to create an EN version and use that as fallback)

 

I implemented solutions for using translated text in emails (based on templates) or notification messages using the user specific language settings.

answered