Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Module:Caller title/doc: Difference between revisions

From Neodyland Wiki
describe how it really works
m 4 revisions imported
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{Module rating|release}}{{Module rating|protected}}<!-- {{Heavily used module|very|edit=sandbox}} --></includeonly>
This module simply returns the title of the page calling this module. It’s intended for templates translated using the [[Help:Autotranslate#Using Extension:Translate|Translate extension]]. It has two entry points, both can be called with <code><nowiki>{{#invoke:Caller title|</nowiki><var>entry point name</var>}}</code>:
This module simply returns the title of the page calling this module. It’s intended for templates translated using the [[Help:Autotranslate#Using Extension:Translate|Translate extension]]. It has two entry points, both can be called with <code><nowiki>{{#invoke:Caller title|</nowiki><var>entry point name</var>}}</code>:
;title: Get the full title of the template.
;title: Get the full title of the template.
;lang: Get the language code (subpage name). In fact, it doesn’t check if the subpage name is a valid language code, so if called from ''X/y/z,'' it’ll happily return ''z.'' The template using this functionality should ensure it’s only used on language subpages (or be okay with garbage output).
;lang: Get the language code (subpage name). In fact, it doesn’t check if the subpage name is a valid language code, so if called from ''X/y/z,'' it’ll happily return ''z.'' The template using this functionality should ensure it’s only used on language subpages (or be okay with garbage output). An additional {{para|base}} parameter can be given with the full title of the translation base page, so that page language is used on that page (as there is no language code subpage there).
<includeonly>
<includeonly>
[[Category:Internationalization templates]]</includeonly>
[[Category:Internationalization templates]]</includeonly>

Latest revision as of 17:55, 12 August 2026

This module simply returns the title of the page calling this module. It’s intended for templates translated using the Translate extension. It has two entry points, both can be called with {{#invoke:Caller title|entry point name}}:

title
Get the full title of the template.
lang
Get the language code (subpage name). In fact, it doesn’t check if the subpage name is a valid language code, so if called from X/y/z, it’ll happily return z. The template using this functionality should ensure it’s only used on language subpages (or be okay with garbage output). An additional |base= parameter can be given with the full title of the translation base page, so that page language is used on that page (as there is no language code subpage there).
Cookies help us deliver our services. By using our services, you agree to our use of cookies.