Difference between revisions of "Template:translated link"

m (add 'no marker' argument to remove (Eng.) — useful for section titles in Tutorial:Callback Functions (Українська))
m (Fixed tipo)
Line 25: Line 25:
 
                         |Português = <nowiki> </nowiki>(ingl.)
 
                         |Português = <nowiki> </nowiki>(ingl.)
 
                         |Română = <nowiki> </nowiki>(eng.)
 
                         |Română = <nowiki> </nowiki>(eng.)
                         |Slovenský = <nowiki> </nowiki>(ang.l)
+
                         |Slovenský = <nowiki> </nowiki>(angl.)
 
                         |Suomi = <nowiki> </nowiki>(eng.)
 
                         |Suomi = <nowiki> </nowiki>(eng.)
 
                         |Svenska = <nowiki> </nowiki>(eng.)
 
                         |Svenska = <nowiki> </nowiki>(eng.)

Revision as of 14:52, 4 February 2020

[edit] [purge] 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 (англ.)