Solved

Different translations for the same word in different subjects

  • 7 March 2019
  • 2 replies
  • 139 views

Userlevel 2
Badge +2
Is it possible to create a different translation for the same word in different subjects?
In one subject we would like to translate the word "code" to the dutch word "looncomponent", but in another subject we would like the word "code" to be translated to the dutch word "code"?
When we change the translation in one subject, the translation is translated for both subjects. I think both use the same translation object.
icon

Best answer by Vincent Doppenberg 7 March 2019, 12:06

View original

2 replies

Userlevel 6
Badge +4
You are correct, two columns with the same ID will share a translation object, regardless of the fact that they are owned by different subjects.

I see two possible solutions to achieve the result you want:

  • In one of the subjects, rename the "code" column to have a different ID than in the other subject.
  • In one of the subjects, hide the "code" column (if possible) and add an expression column which simply selects the "code" column. After that, you can simply translate the expression column instead. This solution is a bit more cumbersome and only possible if the "code" column is readonly, but it might save you a lot of impact to your application logic (e.g. having to rename the column in all of your templates).
I hope this helps.
Userlevel 5
Badge +5
  • In one of the subjects, rename the "code" column to have a different ID than in the other subject.
  • In one of the subjects, hide the "code" column (if possible) and add an expression column which simply selects the "code" column. After that, you can simply translate the expression column instead. This solution is a bit more cumbersome and only possible if the "code" column is readonly, but it might save you a lot of impact to your application logic (e.g. having to rename the column in all of your templates).


I would always go for the first option. If the column has been named 'code', it should be the same (type) of information, regardless of what table is being used. The part for looncomponent should, in my opinion be called loon_component or or loon_component_code as that is the information the column actually stores.

Same goes for example for identity columns. I think they should never be called just 'id' but always have a prefix, most often the name of the table that the id column belongs to, so [tablename]_id

see also: https://office.thinkwisesoftware.com/docs/docs/sf/naming.html#docsNav

Reply