How to handle translation of records in database based on selected language ?

0
I have integrated Language selector in my application. The texts in the application are translated successfully. Now the challenge is to show translated values in controls based on user selected language   I have entity Feedback type   I want to bind TypeName_FI in dropdown if selected language is finnish and TypeName_US if selectedlanguage is English     Please suggest how to achieve database level translations    
asked
2 answers
1

Hi Shikha,

You can impliment this, but this can be a bit tricky.
First make a NPE(FeedbackNPE) with one attribute (eg. Lang)
associate it with your Feedback entity and the entity which is parent to feedback as well. 

Now, 
On the referrence selector(with FeedbackNPE_Parent-association) 
you can call a microflow on the
selectable object tab, in the microflow, First add a retrieve activity and then
retrieve all your preferred objects from the database, and then retrieve the language from
current user, Now based on current language you can populate one NPE each(By using a loop) for feedback object with  Lang attirbute
set based on Feedback object and selected entity.
Now you can return this list.

Hope It helps!

answered
0

Might be an easier task to create just 1 attribuut with the value and one for the language.

Then create multiple records one for each language and then by mean of xpath constraints or mircroflows make sure the right options are available by selecting the data based on the user’s language setting.

Theother option is, as the widgets are strongly related to the selected attribute, to create multiple fields that show the specific language value attribute and show the correct version with conditional visibility.

But I would consider using the first approach.

answered