4

Would anyone be able to explain to me what the difference is between "Original language", "Translation language", and "Translation source"? I think I have a pretty good idea, but for example I've added all of the above to my content overview admin view, and I translated one entity from English to German. The row for that translation in the overview table has:

  • original language -> German
  • translation language -> German
  • translation source -> English

Translation language and Translation source I assume is the language content was translated to, and Translation source was what content the translation was derived from. So, is Original language just the language that the specific content was created in? If so, how does Original language differ from Translation language? Thanks for helping me understand.

1 Answer 1

1

There's an open issue about "Original language" and "Translation language" at https://www.drupal.org/project/drupal/issues/2450195. Its current issue summary includes an explanation of how they're supposed to work:

All translatable entities have a field called Original Language, which is [base table].langcode (e.g., node.langcode for Node entities). They also have a field called Translation Language, which is [field data table].langcode (e.g., node_field_data.langcode for Node entities). Also keep in mind that in translatable entity Views currently, each row of the view output is one translation of the entity.

So, taking nodes as the easiest example, "Original language" is supposed to be the language the node was created in (node.langcode), "Translation language" is supposed to be the language of whatever translation the view has pulled in (node_field_data.langcode), and "Translation source" is whatever language was used as the source for the translation (node_field_data.content_translation_source).

As of right now, that issue is seven years old and still unresolved. Until it's fixed, when you use the "Original language" field, what you'll actually get is node_field_data.langcode, which is the same as "Translation language". ("Original language" when used as a filter or sort does give you node.langcode, which is what it's supposed to do.)

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.