Confirmedusers, editor
2,830
edits
(better formatting for translation variables) |
(Marked this version for translation) |
||
Line 102: | Line 102: | ||
Then save and re-mark the page for translation to update the page across all languages. | Then save and re-mark the page for translation to update the page across all languages. | ||
== Using translation variables == | == Using translation variables == <!--T:32--> | ||
<!--T:33--> | |||
''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.'' | ||
<!--T:34--> | |||
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. | 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. | ||
<!--T:35--> | |||
Translation variables are written like this: <code><nowiki><tvar|name>variable</></nowiki></code> | Translation variables are written like this: <code><nowiki><tvar|name>variable</></nowiki></code> | ||
<!--T:36--> | |||
To translators, it will look like this: | To translators, it will look like this: | ||
<!--T:37--> | |||
: some text that isn't the variable <tvar|1>''$name''</> some more text | : some text that isn't the variable <tvar|1>''$name''</> some more text | ||
<!--T:38--> | |||
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. | 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 === <!--T:39--> | ||
</translate> | </translate> | ||
<code><nowiki>Hello! This is a sentence which includes a translation variable: <tvar|tvar-example>🙂I'm a translation variable</>. Look at it in different languages!</nowiki></code> | <code><nowiki>Hello! This is a sentence which includes a translation variable: <tvar|tvar-example>🙂I'm a translation variable</>. Look at it in different languages!</nowiki></code> | ||
<translate> | <translate> | ||
<!--T:40--> | |||
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>🙂I'm a translation variable</>. Look at it in different languages! | ||