Difference between revisions of "Template:translated link"
m (when English text is unavailable, fallback to text: this makes more sense, e.g. in "click here (eng.)" => here should be translated regardless of whether the article is translated or not) |
m (add 'no marker' argument to remove (Eng.) — useful for section titles in Tutorial:Callback Functions (Українська)) |
||
Line 10: | Line 10: | ||
| [[{{{1|}}}]] | | [[{{{1|}}}]] | ||
}} | }} | ||
− | }} {{#switch: {{{2|}}} | + | }}{{#if: {{{no marker|}}} |
− | + | | | |
− | + | | {{#switch: {{{2|}}} | |
− | + | |Dansk = <nowiki> </nowiki>(eng.) | |
− | + | |Deutsch = <nowiki> </nowiki>(eng.) | |
− | + | |Español = <nowiki> </nowiki>(ing.) | |
− | + | |Français = <nowiki> </nowiki>(ang.) | |
− | + | |Indonesia = <nowiki> </nowiki>(Ingg.) | |
− | + | |Italiano = <nowiki> </nowiki>(ing.) | |
− | + | |Lietuviškai = <nowiki> </nowiki>(ang.) | |
− | + | |Magyar = <nowiki> </nowiki>(ang.) | |
− | + | |Nederlands = <nowiki> </nowiki>(eng.) | |
− | + | |Polski = <nowiki> </nowiki>(ang.) | |
− | + | |Português = <nowiki> </nowiki>(ingl.) | |
− | + | |Română = <nowiki> </nowiki>(eng.) | |
− | + | |Slovenský = <nowiki> </nowiki>(ang.l) | |
− | + | |Suomi = <nowiki> </nowiki>(eng.) | |
− | + | |Svenska = <nowiki> </nowiki>(eng.) | |
− | + | |Türkçe = <nowiki> </nowiki>(ing.) | |
− | + | |Česky = <nowiki> </nowiki>(angl.) | |
− | + | |Ελληνικά = | |
− | + | |Български = <nowiki> </nowiki>(анг.) | |
− | + | |Русский = <nowiki> </nowiki>(англ.) | |
− | + | |Српски = <nowiki> </nowiki>(енг.) | |
− | + | |Українська = <nowiki> </nowiki>(англ.) | |
− | + | |עברית = <nowiki> </nowiki>(אנגלית) | |
− | + | |ไทย = <nowiki> </nowiki>(ภาษาอังกฤษ) | |
− | + | |日本語 = (英語) | |
− | + | |正體中文 = (英文) | |
− | + | |简体中文 = (英文) | |
+ | |Tiếng Việt = <nowiki> </nowiki>(Anh) | ||
+ | |한국어 = (영어) | ||
+ | }} | ||
}} | }} | ||
}}</includeonly><noinclude> | }}</includeonly><noinclude> | ||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 09:35, 31 January 2020
[edit] [ ] Template documentation
This template creates a link either to the translated page (if it exists), or to the English page with an (Eng.) suffix. The (Eng.) suffix is localised.
It's used as follows:
{{translated link|page title|language name|text=link text|english text=untranslated link text}}
To remove the (Eng.) suffix, add the |no marker=1
argument:
{{translated link|page title|language name|text=link text|english text=untranslated link text|no marker=1}}
Not all pages can be translated at once. For usability, it's often more useful to add a link to an English page than to leave the link red. However, in this case, translators will have to go through all the pages, find the English links and replace them with Ukrainian links.
This template automatically replaces English links only translated ones become available, thus having the best of the both worlds.
Examples
{{translated link|love.thread|Українська}}
becomes love.thread{{translated link|lua-enet|Українська}}
becomes lua-enet (англ.){{translated link|lua-enet|Українська|no marker=1}}
becomes lua-enet{{translated link|love.thread|עברית}}
becomes lua-enet (אנגלית){{translated link|Main Page|Indonesia}}
becomes Main Page{{translated link|love.thread|Indonesia}}
becomes love.thread (Ingg.){{translated link|Main Page|日本語}}
becomes Main Page{{translated link|love.thread|日本語}}
becomes love.thread{{translated link|Main Page|正體中文}}
becomes Main Page{{translated link|love.thread|正體中文}}
becomes love.thread(英文){{translated link|Main Page|한국어}}
becomes Main Page{{translated link|lua-enet|한국어}}
becomes lua-enet(영어)
Examples with text:
«Натисніть {{translated link|love.thread|Українська|text=сюди}}»
becomes «Натисніть сюди»«А потім {{translated link|lua-enet|Українська|text=сюди}}»
becomes «А потім сюди (англ.)»
Examples with english text:
{{translated link|love.thread|Українська|text=I'm translated|english text=I'm untranslated}}
becomes I'm translated{{translated link|lua-enet|Українська|text=I'm translated|english text=I'm untranslated}}
becomes I'm untranslated (англ.)
The above documentation is transcluded from Template:translated link/doc. (edit | history) Editors can experiment in this template's sandbox (create) and testcases (create) pages. Please add categories and interwikis to the /doc subpage. Subpages of this template. |