AD shows wrong value set in Swedish

We have a template that contains multiple instances of the same archetype (EVALUATION.recommendation). The different instances are used to document different types of treatment decisions made during a multidisciplinary team (MDT) meeting.

In the template, we have configured an externally coded value set for each instance of the Recommendation archetype. Each instance should have its own value set, containing different values depending on the type of treatment decision being documented.

Everything appears to work correctly when viewing the template in English. Each instance displays the externally coded value set that we configured for that specific instance.

However, when we switch to the Swedish translation in Archetype Designer and look at the resulting form in the Forms tab, the value sets do not appear as expected. Instead, it seems that the values configured for the first instance of the Recommendation archetype are repeated for the subsequent instances as well.

In other words, the template contains different externally coded value sets for the different instances, and these are displayed correctly in English. The problem only appears when viewing the Swedish translation, where the form seems to use the translated value set from the first instance for all instances.

We have encountered a somewhat similar issue with the names of the archetype instances. Since all instances are still based on EVALUATION.recommendation, we added an annotation (L10n.sv) to each instance in the template, containing the Swedish translation we want to use for that particular instance. This prevents all instances from being displayed with the same Swedish name as the first instance.

Do we need to do something similar for the externally coded value sets to ensure that each instance has its own Swedish translation? If so, we are not aware of how this should be configured.

Could this be a bug in how Archetype Designer handles translations when multiple instances of the same archetype have different externally coded value sets? Or is there a specific translation or localisation configuration that we are missing?

We have not encountered this issue in our previous work with templates and translations, so we are also wondering why it occurs in this particular case and whether there is something specific that could trigger this behaviour.

Can it be related to Limitation preventing multilingual repeated parts in the OPT (operational template) export format ?

I think it may be related to that earlier post, yes. @emmanuel.eschmann just explained this issue to me the other day, so maybe he could explain it further here as well?

I have no experience with the Forms tab in the Archetype Designer, but this problem may well have the same root cause as the behaviour we observed in the opt and Web templates generated from multilingual templates:

If we used an archetype multiple times within a template, the DE and FR translations in the opt and Web templates (when EN was selected as the primary language) would only reflect the node name, description and comment of an archetype’s first occurrence in the template for each other instance of the same archetype. The specific node names, descriptions and comments for subsequent occurrences of the same archetype were simply missing entirely from the opt and Web templates.

We described our problem in Translations lost in OPT when an archetype is used multiple times and Ian McNicoll answered that this problem stems from the definition of ADL1.4 and the opt, and that it would only be resolved by ADL2 and opt2.

@Silje, thank you very much for pointing out this thread and, in doing so, highlighting the workaround using the annotation ‘L10n’. I was not aware of this until now.