Writing systems/Syntax

This page describes special markups found in 1>Special:MyLanguage/Writing systems#LanguageConverter|LanguageConverter, a system which converts between language variants via means of character/word replacement.

In all examples below, characters in lowercase are used to represent Simplified Chinese, and UPPERCASE ones represent Traditional Chinese.

Concept
LanguageConverter markups looks like:



Where flags are described below, and variant names are language codes (like   or  ).

Fallback among variants is available.

In the following examples designed for Chinese,   and   are variants written in the   script, while  ,   are variants written in the  </> script.

For example, according to the <tvar|1> </> definition in <tvar|2></>, if no rules for <tvar|3> </> were found, the converter would try using definitions for <tvar|4> </>, <tvar|5> </>, and <tvar|6> </>.

In this example you may notice that <tvar|1> </> and <tvar|2> </> are absent from most examples.

This is due to their high similarity to other variants, <tvar|1> </> and <tvar|2> </> respectively.

Exceptions
Language converter avoids converting anything found in "code" blocks like <tvar|pre><pre ></pre></>, <tvar|code><code ></code></>, as well as the <tvar|script><script ></script></> tag used for carrying executable JavaScript.

Putting an empty conversion rule block <tvar|code> </> inside these tags will function as a "force convert" switch for the converter.

This hack can be useful for code samples nested in these tags.

A caveat, however, is that this switch doesn't seem to work for the extension-provided <tvar|1>syntaxhighlight</> tags which eventually generates a <tvar|pre><pre ></pre></> nested with elements (<tvar|2>T34943</>).

The switch also won't work with scripts not originally included with the page's HTML source that LC is designed to operate on.

MediaWiki messages are not processed by LC.

This inconvenience is tracked in <tvar|1>T170916</>.