Difference between revisions of "Template:Translate-link"
From Dragon Age Toolset Wiki
Line 10: | Line 10: | ||
| | | | ||
<!-- Create a link to translated page --> | <!-- Create a link to translated page --> | ||
− | + | {{#if: {{{2|}}} | |
+ | |[[{{{1|:{{NAMESPACE}}:{{BASEPAGENAME}}}}}/{{{3}}}|{{{2}}}]] | ||
+ | |[[{{{1|:{{NAMESPACE}}:{{BASEPAGENAME}}}}}/{{{3}}}|{{{1}}}]] | ||
+ | }} | ||
<!-- If not exist page has been translated into current language --> | <!-- If not exist page has been translated into current language --> | ||
| | | | ||
<!-- Create a link to translated and original page --> | <!-- Create a link to translated and original page --> | ||
− | + | {{#if: {{{2|}}} | |
+ | |[[{{{1|:{{NAMESPACE}}:{{BASEPAGENAME}}}}}/{{{3}}}|{{{2}}}]] [[{{{1|:{{NAMESPACE}}:{{BASEPAGENAME}}}}}|(en)]] | ||
+ | |[[{{{1|:{{NAMESPACE}}:{{BASEPAGENAME}}}}}/{{{3}}}|{{{1}}}]] [[{{{1|:{{NAMESPACE}}:{{BASEPAGENAME}}}}}|(en)]] | ||
+ | }} | ||
}} | }} | ||
<!-- If 3rd param is not defined --> | <!-- If 3rd param is not defined --> |
Revision as of 23:46, 7 November 2010
Description
Template allows you to quickly create links to translated page DA Builder Wiki using the language of the current page:
Source code | Condition | Output |
---|---|---|
{{Translate-link|Main Page}} |
If the language of the current page could not be extracted | Translate-link: GETTING_LANGUAGE_ERROR |
If the page translated into current language exists (i.e. this page in Russian) | Main Page | |
If the page translated into current language does not exist (i.e. this page in Russian) | Main Page (en) | |
{{Translate-link|Main Page|New page name}} |
If the language of the current page could not be extracted | Translate-link: GETTING_LANGUAGE_ERROR |
If the page translated into current language exists (i.e. this page in Russian) | New page name | |
If the page translated into current language does not exist (i.e. this page in Russian) | New page name (en) | |
{{Translate-link|Main Page|3=ru}} |
If the language of the current page could not be extracted | See bellow |
If the page translated into current language exists (i.e. this page in Russian) | Main Page | |
If the page translated into current language does not exist (i.e. this page in Russian) | Main Page (en) | |
{{Translate-link|Main Page|New page name|ru}} |
If the language of the current page could not be extracted | See bellow |
If the page translated into current language exists (i.e. this page in Russian) | New page name | |
If the page translated into current language does not exist (i.e. this page in Russian) | New page name (en) |