Difference between revisions of "Template:translated link/doc"

(Created page with "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:...")
 
m (described no marker=1)
 
Line 3: Line 3:
 
It's used as follows:
 
It's used as follows:
 
     <nowiki>{{translated link|page title|language name|text=link text|english text=untranslated link text}}</nowiki>
 
     <nowiki>{{translated link|page title|language name|text=link text|english text=untranslated link text}}</nowiki>
 +
 +
To remove the (Eng.) suffix, add the <code>|no marker=1</code> argument:
 +
    <nowiki>{{translated link|page title|language name|text=link text|english text=untranslated link text|no marker=1}}</nowiki>
  
 
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.
 
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.
Line 12: Line 15:
 
* <code><nowiki>{{translated link|love.thread|Українська}}</nowiki></code> becomes {{translated link|love.thread|Українська}}
 
* <code><nowiki>{{translated link|love.thread|Українська}}</nowiki></code> becomes {{translated link|love.thread|Українська}}
 
* <code><nowiki>{{translated link|lua-enet|Українська}}</nowiki></code> becomes {{translated link|lua-enet|Українська}}
 
* <code><nowiki>{{translated link|lua-enet|Українська}}</nowiki></code> becomes {{translated link|lua-enet|Українська}}
 +
* <code><nowiki>{{translated link|lua-enet|Українська|no marker=1}}</nowiki></code> becomes {{translated link|lua-enet|Українська|no marker=1}}
 
* <code><nowiki>{{translated link|love.thread|עברית}}</nowiki></code> becomes {{translated link|lua-enet|עברית}}
 
* <code><nowiki>{{translated link|love.thread|עברית}}</nowiki></code> becomes {{translated link|lua-enet|עברית}}
 
* <code><nowiki>{{translated link|Main Page|Indonesia}}</nowiki></code> becomes {{translated link|Main Page|Indonesia}}
 
* <code><nowiki>{{translated link|Main Page|Indonesia}}</nowiki></code> becomes {{translated link|Main Page|Indonesia}}

Latest revision as of 09:37, 31 January 2020

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 (англ.)