function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Naveen JainNaveen Jain 

Translating Field Values

We have a custom object that has a description field of type "text".

 

Requirement is to manage translations of the value of the description field.

 

Only options that comes to my mind are

 

Option 1

- Create a new custom object with may be master-detail relationship, to track the translations of the field values. Pros - new translations can be added without any issue.

 

Option 2

- Create new custom fields for each of the languages that the original value needs to be translated in. Basically add description_fr, description_sp fields. Obviously, the downside of this approach is that if there is new language tomorrow then it will require schema change.

 

Question

1. Does Salesforce provides out-of-box way to manage translations? Translation Bench seems to work with UI elements and not with values.

2. Are there any other options?

 

Thanks

Shashikant SharmaShashikant Sharma

You are correct that salesforce only provide translations for UI elements not for field values, you will have to think of a your own solution like you mentioned in your post using a custom object. You can also try to create sperate LangTranslation Classes having translations for values , but again in this case also if another new lang comes requires a new class and new package.

Naveen JainNaveen Jain

Can you please elaborate on LangTranslation Classes? How will they work? Are they real time translation?

 

Thanks

Admin1112Admin1112

Hi Can you please eloborate on Lang Transaltion Classes, can you please share some sample code.

 

I am eagerly looking for this solution.

 

Looking forward your response.