Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info

This feature is disabled by default and needs to be enabled and configured by Dual Code. For more information, please contact us.

...

When writing a page that contains both English and French content, you want to wrap your page content in a specific tag called mlang as per the following example.

{mlang en}Hello World{mlang}{mlang fr_ca}Bonjour monde{mlang}

Using the example above, a person viewing the page in English will see "Hello World" while a person viewing the page in Canadian French will see "Bonjour monde". 

Please note that the two- or four-letter acronym at the end of your theme name and the one at the end of of the mlang tag (ie. en, fr, fr_ca) needs to be identical to your local. If you put "fr_ca" for example but your site is only configured to use "fr" (French, not Canadian French), then the web page may not display correctly.  

Working with Multiple Paragraphs

When translating a web page or section that has multiple paragraphs, the entire content for one (1) language should be wrapped within one (1) mlang tag

The following example is correct:

<p>{mlang en}An interactive module designed to improve the ability of health researchers and peer reviewers to account for sex and gender in biomedical research involving animals, cells or tissues.</p>
<p><strong>Length:</strong> 45 minutes{mlang}</p>
<p>{mlang fr}Un module interactif conçu pour améliorer la capacité des chercheurs en santé et des pairs évaluateurs à tenir compte du sexe biologique dans la recherche biomédicale impliquant des animaux, des cellules ou des tissus.</p>
<p><strong>Durée :</strong> 45 minutes{mlang}</p>

On the other hand, this example is incorrect:

{mlang en}<p>An interactive module designed to improve the ability of health researchers and peer reviewers to account for sex and gender in biomedical research involving animals, cells or tissues.</p>{mlang}
{mlang fr}<p>Un module interactif conçu pour améliorer la capacité des chercheurs en santé et des pairs évaluateurs à tenir compte du sexe biologique dans la recherche biomédicale impliquant des animaux, des cellules ou des tissus.</p>{mlang}
{mlang en}<p><strong>Length:</strong> 45 minutes{mlang}</p>{mlang}
{mlang fr}<p><strong>Durée :</strong> 45 minutes</p>{mlang}