Skip to main content
Solved

Different translations for the same word in different subjects


Forum|alt.badge.img+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.

Best answer by Vincent Doppenberg

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.
View original
Did this topic help you find an answer to your question?
This topic has been closed for replies.

2 replies

Forum|alt.badge.img+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.

Robert Jan de Nie
Thinkwise blogger
Forum|alt.badge.img+5
Vincent Doppenberg wrote:
  • 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

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings