ଛାଞ୍ଚ:Xyzy
ଦେଖଣା
- The following documentation is located at Template:Xyzy/doc. [edit]
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}}
: {{ ଛାଞ୍ଚ:/script |foo|face=|lang=}}{{Xyzy|foo|face=bold}}
: {{ ଛାଞ୍ଚ:/script |foo|face=bold|lang=}}{{Xyzy|foo|face=ital}}
: {{ ଛାଞ୍ଚ:/script |foo|face=ital|lang=}}{{Xyzy|foo|face=term}}
: {{ ଛାଞ୍ଚ:/script |foo|face=term|lang=}}{{Xyzy|字典|lang=cmn}}
: {{ ଛାଞ୍ଚ:cmn/script |字典|face=|lang=cmn}}{{Xyzy|字典|lang=ja}}
: {{ ଛାଞ୍ଚ:ja/script |字典|face=|lang=ja}}{{Xyzy|พจนานุกรม|lang=th|face=head}}
: {{ ଛାଞ୍ଚ:th/script |พจนานุกรม|face=head|lang=th}}
Bad examples:
{{Xyzy|foo|face=bogus}}
: {{ ଛାଞ୍ଚ:/script |foo|face=bogus|lang=}}{{Xyzy|foo|lang=xx-zz}}
: {{ ଛାଞ୍ଚ:xx-zz/script |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
[ସମ୍ପାଦନା]{{t|fr|foo}}
: [[foo#ଛାଞ୍ଚ:fr|{{ଛାଞ୍ଚ:fr/script|lang=fr|foo}}]] (fr){{t|th|พจนานุกรม}}
: [[พจนานุกรม#ଛାଞ୍ଚ:th|{{ଛାଞ୍ଚ:th/script|lang=th|พจนานุกรม}}]] (th)