Skip to Main Content

Visual Builder

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Translate the content of a business object

JohannaBStumpfJul 1 2024 — edited Jul 1 2024

Hello,
I have a business object that contains references to other business objects. I want the contents of the referenced business objects to adjust to the current language of the application.

Example:
A business object called “Meal” has references to business objects “Starter”, “Main Course” and “Dessert”. The “Dessert” business object contains the data “ice cream”, “chocolate cake”, “apple pie”.

When creating an edit page for the “Meal” business object, I automatically get a dropdown menu where I can choose the dessert from the given data.

Now I want to be able to switch the language of the whole application - including the business objects - to German. So, when the language of the application is set to English, I want to see a dropdown with the data above, but when the language is German, I want to see a dropdown with “Eiskrem", "Schokoladenkuchen” and “Apfelstrudel”.

I tried two approaches, but was unable to make either of them work:

1. Instead of writing “ice cream” in the business object, I tried to write a reference to the translation object [[$application.translations.app.IceCream]]. However, that just displays the string “[[$application.translations.app.IceCream]]”. I was unable to escape the string to have this dynamically refer to the correct translation object.

2. I created two columns/fields in the “Dessert” business object, “en” and “de” and added the respective translations in the columns. However, for this potential solution I was unable to dynamically choose which column of the business object should be displayed, depending on the current language of the app.

Is there a way to translate the data inside of business objects, or is there another way to achieve what I am trying to do?

This post has been answered by JohannaBStumpf on Jul 3 2024
Jump to Answer
Comments
Post Details
Added on Jul 1 2024
4 comments
409 views