Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Search
English
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Template:Translatable template name
Template
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<noinclude> <languages/> </noinclude><includeonly>{{#invoke:Template translation{{{sandbox|}}}|getTranslatedTemplate|uselang={{{uselang|}}}|tntns={{{tntns|{{{namespace|}}}}}}|template={{#if:{{{noshift|}}}|{{{template}}}|{{{1}}}}}|noshift={{{noshift|}}}<!-- there are no other parameters here -->}}</includeonly><noinclude> {{documentation|content= {{High-use|15000}} {{tsh|TNTN|tntn}} {{Lua|Module:Template translation}} <translate> == Purpose == <!--T:1--> </translate> <translate><!--T:2--> This template is used to return the name of translatable templates in the language of the current page.</translate> Templates, like all other MediaWiki pages, can be translated using the {{ll|Extension:Translate|nsp=0}} extension, which creates subpages with the form "pagename/language code". <translate><!--T:3--> The template first checks if the name of the page contains a language code.</translate> <translate><!--T:4--> If it does, it then checks if the template name given as a first parameter has a translation in that language.</translate> <translate><!--T:5--> If the page name does not contain a language code, or if the navigation template doesn't exist in that language, it will display the English template.</translate> <translate> == How to use == <!--T:6--> </translate> * <code><nowiki>{{ {{Translatable template name|</nowiki>''name of navigation template''<nowiki>}}|</nowiki>''parameters....''<nowiki>}}</nowiki></code> * <code><nowiki>{{ {{TNTN|</nowiki>''name of navigation template''<nowiki>}}|</nowiki>''parameters....''<nowiki>}}</nowiki></code> * <code><nowiki>{{ {{tntn|</nowiki>''name of navigation template''<nowiki>}}|</nowiki>''parameters....''<nowiki>}}</nowiki></code> Example (from translatable [[meta:Template:Meta]], used in translatable page [[meta:Meta:About]]): : <code><nowiki>{{Translatable template name|Navbar}}</nowiki></code> or <code><nowiki>{{TNTN|Navbar}}</nowiki></code> which returns the translated versions of {{tl|Navbar}} if it exists, or the English version if translations don't exist. <translate> == Parameters == <!--T:7--> </translate> <translate><!--T:8--> The current version of the template may now include any kind of named or numbered parameters, whose values will be transferred into the called template (except for parameter 1 containing the basename of the translatable template to transclude).</translate> <translate><!--T:9--> Numbered parameters will be shifted down by one position, all named parameters will be passed unchanged.</translate> <translate><!--T:10--> One named parameter is treated specially:</translate> * <code><nowiki>{{Translatable template name|tntns=</nowiki>'':somename:''<nowiki>|</nowiki>''page name''<nowiki>}}</nowiki></code> * <code><nowiki>{{TNTN|tntns=</nowiki>'':somename:''<nowiki>|</nowiki>''page name''<nowiki>}}</nowiki></code> * <code><nowiki>{{tntn|tntns=</nowiki>'':somename:''<nowiki>|</nowiki>''page name''<nowiki>}}</nowiki></code> This <code>tntns</code> will be used to specify another namespace from which the translatable pagename will be transcluded, instead of referencing the page name from the default <code>:Template:</code> namespace. Note that this parameter is also passed (without modification) within the parameters of the transclusion. Example with one parameters (from [[meta:Meta:About]] which is translatable): * <code><nowiki>{{ {{TNTN|Navbar}} |Meta:About}}</nowiki></code> <translate> == Dependency == <!--T:11--> </translate> * [[Module:Template translation]] (standard version) * [[meta:Module:Template translation/sandbox]] (used when this template is called with optional parameter <code>sandbox=/sandbox</code>, for testing modifications only) <translate> == See also == <!--T:12--> </translate> * {{tl|Translatable template}}, alias {{tl|TNT}} or {{tl|tnt}} [[Category:Navigation templates{{#translation:}}|* {{PAGENAME}}]] [[Category:Internationalization templates{{#translation:}}|{{PAGENAME}}]] [[Category:Lua-based templates]] }} </noinclude>
Summary:
Please note that all contributions to pub.solar wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
pub.solar wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:((
(
edit
)
Template:))
(
edit
)
Template:Documentation
(
edit
)
Template:High-risk
(
edit
)
Template:High-risk/en
(
edit
)
Template:High-use
(
edit
)
Template:Ll
(
edit
)
Template:Localized link
(
edit
)
Template:Lua
(
edit
)
Template:Ombox
(
edit
)
Template:Pagelang
(
edit
)
Template:Tl
(
edit
)
Template:Translatable
(
edit
)
Template:Tsh
(
edit
)
Module:Arguments
(
edit
)
Module:Documentation
(
edit
)
Module:Documentation/config
(
edit
)
Module:Documentation/i18n
(
edit
)
Module:Documentation/styles.css
(
edit
)
Module:List
(
edit
)
Module:Lua banner
(
edit
)
Module:Lua banner/config
(
edit
)
Module:Message box
(
edit
)
Module:Message box/configuration
(
edit
)
Module:Message box/ombox.css
(
edit
)
Module:TNT
(
edit
)
Module:TableTools
(
edit
)
Module:Template translation
(
edit
)
Module:Yesno
(
edit
)