Universal script template

This template is a metatemplate used by such templates as {{term}} and {{t}}; it handles the script selection. It will generate correct attributes and html/xml language tags. If the language is known, it attempts to invoke the most likely script template (e.g. {{Hebr}}, Hebrew script, if lang=he, Hebrew language).

This is only to be used by other templates, never in entries; entries should use the correct script template directly if needed.

  • (1) text to be tagged
  • sc= — optional — the specific script template to call, if known; omit, or set to blank, if the script template should be selected based on lang=.
  • lang= — optional, but strongly encouraged — the language code (included in the generated HTML, and used to select a script template if sc= is not specified); should be a valid language code; omit, or set explicitly to blank, if the correct language-code is unavailable.
  • face= — optional — one of [term, ital, head, bold] to set default attributes; omit, or set to blank, if none of these is appropriate.

See {{Xyzy/script}} for details of how the script template is selected.

(see page source in your browser)

  • {{Xyzy|foo}}: foo
  • {{Xyzy|foo|face=bold}}: foo
  • {{Xyzy|foo|face=ital}}: foo
  • {{Xyzy|foo|face=term}}: foo
  • {{Xyzy|字典|lang=cmn}}: {{ Script error: The function "lookup_language" does not exist. |字典|face=|lang=cmn}}
  • {{Xyzy|字典|lang=ja}}: {{ Script error: The function "lookup_language" does not exist. |字典|face=|lang=ja}}
  • {{Xyzy|พจนานุกรม|lang=th|face=head}}: {{ Script error: The function "lookup_language" does not exist. |พจนานุกรม|face=head|lang=th}}

Bad examples:

  • {{Xyzy|foo|face=bogus}}: foo
  • {{Xyzy|foo|lang=xx-zz}}: {{ Script error: The function "lookup_language" does not exist. |foo|face=|lang=xx-zz}}

The name comes from the magic word "xyzzy" from Adventure. It is made to look like an ISO script name, but one very unlikely to be assigned.