Difference between revisions of "Template:Translate-link"
From Dragon Age Toolset Wiki
m (Design ^-^) |
|||
Line 26: | Line 26: | ||
|- | |- | ||
|rowspan="3" |<pre>{{Translate-link|Main Page}}</pre> | |rowspan="3" |<pre>{{Translate-link|Main Page}}</pre> | ||
− | |If language of the current page | + | |If the language of the current page could not be extracted |
|[[Main Page|Translate-link: <span style="color:#CC2200">GETTING_LANGUAGE_ERROR</span>]] | |[[Main Page|Translate-link: <span style="color:#CC2200">GETTING_LANGUAGE_ERROR</span>]] | ||
|- | |- | ||
− | |If | + | |If the page translated into current language exists (i.e. this page in Russian) |
|[[Main Page/ru|Main Page]] | |[[Main Page/ru|Main Page]] | ||
|- | |- | ||
− | |If | + | |If the page translated into current language does not exist (i.e. this page in Russian) |
|[[Main Page/ru|<span style="color:#CC2200">Main Page</span>]] [[Main Page|(en)]] | |[[Main Page/ru|<span style="color:#CC2200">Main Page</span>]] [[Main Page|(en)]] | ||
|- | |- | ||
|rowspan="3" |<pre>{{Translate-link|Main Page|New page name}}</pre> | |rowspan="3" |<pre>{{Translate-link|Main Page|New page name}}</pre> | ||
− | |If language of the current page | + | |If the language of the current page could not be extracted |
|[[Main Page|Translate-link: <span style="color:#CC2200">GETTING_LANGUAGE_ERROR</span>]] | |[[Main Page|Translate-link: <span style="color:#CC2200">GETTING_LANGUAGE_ERROR</span>]] | ||
|- | |- | ||
− | |If | + | |If the page translated into current language exists (i.e. this page in Russian) |
|[[Main Page/ru|New page name]] | |[[Main Page/ru|New page name]] | ||
|- | |- | ||
− | |If | + | |If the page translated into current language does not exist (i.e. this page in Russian) |
|[[Main Page/ru|<span style="color:#CC2200">New page name</span>]] [[Main Page|(en)]] | |[[Main Page/ru|<span style="color:#CC2200">New page name</span>]] [[Main Page|(en)]] | ||
|} | |} | ||
</noinclude> | </noinclude> |
Revision as of 22:30, 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) |