⚠ NOTICE

The game has been released in Early Access on 26th of April, 2024.
Please keep in mind that any information provided on this Wiki may be incomplete or subject to change as the game progresses.

Template:Tl: Difference between revisions

From Manor Lords Official Wiki
(add usage and examples)
(update doc)
 
Line 3: Line 3:
|Special:MyLanguage/
|Special:MyLanguage/
}}</onlyinclude><noinclude>
}}</onlyinclude><noinclude>
==Doc==
<translate>
Simple way to selectively add Special:MyLanguage at the start of a link. For Special:MyLanguage to work properly, the ''user's language preference'' must be set. You can do this at [[Special:Preferences]] or check the menu in the top right.
==Documentation==
Links between pages in wiki software are surrounded by <code><nowiki>[[brackets]]</nowiki></code> on the outside. Inside the brackets, you generally have two parts. The first is the link target, which tells the code what page it should link to. The second is the link text, which tells the page what text should be displayed, what the user sees and what text they can click on. Here is an example of the parts of the link:
<code><nowiki>[[{{tl}}<LINK TARGET>|<LINK TEXT>]]</nowiki></code>


It will only be added when viewing translated pages (as visiting the /en version while not using the standard page title is something best avoided). Nothing will appear on EN versions nor will anything be added to the link, so ''EN versions will always link to EN versions'', even if the user's language preference is something else.
Because this wiki is translated into several different languages, each article on the wiki has several different versions. The problem is that these pages are stored at different page names, or link targets.


===Usage===
This template will help you with the link target, by automatically targeting the link to the correct page for your language. However, it does not help you with with the second part, the link text. If you are a ''translator'', then the link text is the only part that you need to translate.
put {{tl}} at the start of the page name, like so: <code><nowiki>[[{{tl}}Burgage Plot]]</nowiki></code>
</translate>
<translate>
===Advanced information===
This template is a simple way to selectively add Special:MyLanguage, a language specific link-targeting code, at the start of a link. For Special:MyLanguage to work properly, the ''user's language preference'' must be set. You can do this at [[Special:Preferences]] or check the menu in the top right.


You can pipe this link to add linktext like normal without any difference. <code><nowiki>[[{{tl}}Family|Families]]</nowiki></code>
This targeting code will only be added when viewing translated pages (as visiting the /en version while not using the standard page title is something best avoided). Nothing will appear on EN versions nor will anything be added to the link, so ''EN versions will always link to EN versions'', even if the user's language preference is something else.
</translate>


<translate>
'''Translators''': This template handles the targeting of the link, to take users to the correct page. However by default, the clickable link text will still show the ''English name'' for the building. You must still localise the link-text at the end, and change it to your language: these are the words after the <code>{{!}}</code> symbol. '''''Do not change''' the start of the link'' before the <code>{{!}}</code> symbol.
Example: <code><nowiki>[[{{tl}}Family|<TRANSLATE THIS LINK TEXT>]]</nowiki></code> -> (fr édition français/French version) <code><nowiki>[[{{tl}}Family|famille]]</nowiki></code>
</translate>
<translate>
===Usage information for all users===
All users should put <code><nowiki>{{tl}}</nowiki></code> inside the <code><nowiki>[[link brackets]]</nowiki></code>, at the start of the link target or page name, like so: <code><nowiki>[[{{tl}}Burgage Plot]]</nowiki></code>. This include everyone, including English users.
All users can pipe this link (add <code>{{!}}</code> inside the link, between the brackets) to add linktext like normal without any difference to normal links on other wikis. <code><nowiki>[[{{tl}}Family|Families]]</nowiki></code>
If you are a translator, only translate the link text ''after'' the <code>{{!}}</code> symbol. '''''Do not change''' the start of the link'' before the <code>{{!}}</code> symbol.
</translate>
<translate>
===Examples===
===Examples===
<!-- Translators: feel free to change these examples to suit your language.-->
<pre>
<pre>
* [[{{tl}}Burgage Plot]]
* [[{{tl}}Burgage Plot]]
* [[{{tl}}Burgage Plot|families are housed here]]
* [[{{tl}}Burgage Plot|families are housed here]]
* [[{{tl}}Burgage Plot|les familles sont hébergées ici]]
</pre>
</pre>
* [[{{tl}}Burgage Plot]]
* [[{{tl}}Burgage Plot]]
* [[{{tl}}Burgage Plot|families are housed here]]
* [[{{tl}}Burgage Plot|families are housed here]]
 
* [[{{tl}}Burgage Plot|les familles sont hébergées ici]]
</translate>
</noinclude>
</noinclude>

Latest revision as of 01:17, 11 May 2024

Documentation

Links between pages in wiki software are surrounded by [[brackets]] on the outside. Inside the brackets, you generally have two parts. The first is the link target, which tells the code what page it should link to. The second is the link text, which tells the page what text should be displayed, what the user sees and what text they can click on. Here is an example of the parts of the link: [[{{tl}}<LINK TARGET>|<LINK TEXT>]]

Because this wiki is translated into several different languages, each article on the wiki has several different versions. The problem is that these pages are stored at different page names, or link targets.

This template will help you with the link target, by automatically targeting the link to the correct page for your language. However, it does not help you with with the second part, the link text. If you are a translator, then the link text is the only part that you need to translate.

Advanced information

This template is a simple way to selectively add Special:MyLanguage, a language specific link-targeting code, at the start of a link. For Special:MyLanguage to work properly, the user's language preference must be set. You can do this at Special:Preferences or check the menu in the top right.

This targeting code will only be added when viewing translated pages (as visiting the /en version while not using the standard page title is something best avoided). Nothing will appear on EN versions nor will anything be added to the link, so EN versions will always link to EN versions, even if the user's language preference is something else.

Translators: This template handles the targeting of the link, to take users to the correct page. However by default, the clickable link text will still show the English name for the building. You must still localise the link-text at the end, and change it to your language: these are the words after the | symbol. Do not change the start of the link before the | symbol.

Example: [[{{tl}}Family|<TRANSLATE THIS LINK TEXT>]] -> (fr édition français/French version) [[{{tl}}Family|famille]]

Usage information for all users

All users should put {{tl}} inside the [[link brackets]], at the start of the link target or page name, like so: [[{{tl}}Burgage Plot]]. This include everyone, including English users.

All users can pipe this link (add | inside the link, between the brackets) to add linktext like normal without any difference to normal links on other wikis. [[{{tl}}Family|Families]]

If you are a translator, only translate the link text after the | symbol. Do not change the start of the link before the | symbol.

Examples

* [[{{tl}}Burgage Plot]]
* [[{{tl}}Burgage Plot|families are housed here]]
* [[{{tl}}Burgage Plot|les familles sont hébergées ici]]