Template:Int/doc

    From BelieveTheSign
    Revision as of 19:57, 27 December 2021 by Admin (talk | contribs) (Created page with "{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> === Usage === * <code><nowiki>{{Int|</nowiki>''name''<nowiki>}}</nowiki></c...")
    (diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

    Script error: No such module "Message box".

    Usage

    • {{Int|name}}
    Same as {{Int:name}} but uses the language of the current page infered by Template:Tl (instead of the user language), supporting standard fallbacks supported by MediaWiki.
    • {{Int|name|lang=code}}
    Same as {{Int:name}} but allows specifying a specific language code (instead of the user language), supporting standard fallbacks supported by MediaWiki.

    Note that if there's no defined translations at all for name (in MediaWiki:name), this template will return the given name with only its first letter capitalized. This template is not intended to give translations of translatable messages that are not defined in the MediaWiki UI.

    Examples

    • {{Int:show}} returns "Show" (in the current user language selected in the UI or from user preferences)
    • {{Int|show}} returns "Template:Int" (in the language of the current page)
    • {{Int|show|lang=de}} returns "Template:Int" (in standard German)
    • {{Int|show|lang=de-formal}} returns "Template:Int" (in formal German, falling back to standard German)
    • {{Int|show|lang=de-informal}} returns "Template:Int" (in informal German, falling back to English as there's no standard fallback for it in the local instance of MediaWiki)

    Note

    The code of this template uses complex syntax, but its performance is very good (its execution time unnoticeable), and it does not require any costly parser function.

    See also