Template:Xyzy

Definition from Wiktionary, the free dictionary
Jump to: navigation, search

The following documentation is located at Template:Xyzy/documentation. [edit]

Contents

Usage

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.

Parameters

  • (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.

Examples

(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}}: 字典
  • {{Xyzy|字典|lang=ja}}: 字典
  • {{Xyzy|พจนานุกรม|lang=th|face=head}}: พจนานุกรม

Bad examples:

  • {{Xyzy|foo|face=bogus}}: foo
  • {{Xyzy|foo|lang=xx-zz}}: {{ Script error |foo|face=|lang=xx-zz}}

Notes

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.

Tests