Vintage Story Wiki:How to translate the wiki: Difference between revisions

From Vintage Story Wiki
better formatting for translation variables
(Adding section on translation variables.)
(better formatting for translation variables)
Line 106: Line 106:
''Note: our version of the Translate extension is outdated, so current MediaWiki documentation does not apply for this feature.''
''Note: our version of the Translate extension is outdated, so current MediaWiki documentation does not apply for this feature.''


Sometimes, you ''don't'' want to translate something in a page - maybe it is something like a number or some piece of code that should not be translated. In this case, you can use a translation variable in order to make sure translation of the page does not change it.
Sometimes, you ''don't'' want to translate something in a page - maybe it is something like a number, a special link name, or some piece of code that should not be translated. In this case, you can use a translation variable in order to make sure translation of the page does not change it.


Translation variables are written as <code><nowiki>some text that isn't the variable <tvar|name>variable</> some more text</nowiki></code>. To translators, it will look like this:
Translation variables are written like this: <code><nowiki>&lt;tvar&#124;name&gt;variable&lt;/&gt;</nowiki></code>


: some text that isn't the variable ''$name'' some more text
To translators, it will look like this:


When translating, simply paste in the ''$name'' part and it will appear in your translation exactly as it is in the original page.
: some text that isn't the variable <tvar|1>''$name''</> some more text
 
When translating, simply paste in the <tvar|2>''$name''</> part and it will appear in your translation exactly as it is in the original page.


=== Example ===
=== Example ===
</translate>
</translate>
<pre>Hello! This is a sentence which includes a translation variable: <tvar|tvar-example>😀I'm a translation variable</>. Look at it in different languages!</pre>
<code><nowiki>Hello! This is a sentence which includes a translation variable: &lt;tvar&#124;tvar-example&gt;&#128578;I'm a translation variable&lt;/&gt;. Look at it in different languages!</nowiki></code>
 
<translate>
<translate>
Hello! This is a sentence which includes a translation variable: <tvar|tvar-example>😀I'm a translation variable</>. Look at it in different languages!
Hello! This is a sentence which includes a translation variable: <tvar|tvar-example>&#128578;I'm a translation variable</>. Look at it in different languages!


</translate>
</translate>


[[Category:Wiki Editing]]
[[Category:Wiki Editing]]
Confirmedusers, editor
2,830

edits