How to show pre-translated content
This article explains how to show pre-translated content with Instant Translation.
Overview
Showing pre-translated content is sometimes required for legal disclaimers or industry specific terminology. Pre-translated content can be conditionally shown using DekiScript HTML attributes and the __translate
environment variable. The __translate
environment variable is set to the IETF language code when Instant Translation is active, otherwise the value is nil
.
The following HTML fragment shows how to present the desired pre-translated content depending the translation language.
<div if="__translate" translate="no"> <p if="__translate=='de-DE'"> This content is only shown when the page is translated to German by Instant Translation. </p> <p if="__translate=='fr-FR'"> This content is only shown when the page is translated to French by Instant Translation. </p> </div> <div if="!__translate"> <p> This content is only shown if the page is not translated by Instant Translation. </p> </div>
We can help
For expert guidance on branding and advanced features, contact MindTouch experts.
Get Expert Help