How are cross-references handled during content localization in DITA?

When it comes to content localization in DITA XML, handling cross-references requires careful consideration to ensure that the localized content maintains its integrity and accessibility. DITA provides mechanisms for managing cross-references in a way that allows for efficient localization while keeping references accurate.

1. Keys and Keyrefs: DITA allows you to use keys and keyrefs to handle cross-references that need to be localized. Instead of hardcoding the cross-references with specific text, you can use keys as placeholders. For example, you might define a key for a product name, and then use keyrefs in your content. This way, when you localize the content for different languages, you only need to update the key definitions, and the references automatically adapt to the localized terms.

Example:


<keydef keys="product-name-en" format="text">DITA Pro</keydef>
...
<p>Learn more about <ph keyref="product-name-en"/> features.</p>

2. Conditional Text: In DITA, you can use conditional processing to control the visibility of content based on localization. By defining conditional attributes for specific language targets, you can include or exclude content based on the language of the localized output. This approach is helpful when dealing with cross-references that may vary in different languages.

By employing these techniques, DITA ensures that cross-references can be effectively managed during content localization, maintaining the accuracy and coherence of the content while adapting it to various languages and locales.