This template is used to show usage examples (not quotations or collocations) following a definition line. It adds the page to the category "<language> terms with usage examples", and serves as machine-readable content descriptor to facilitate automated processing, also marking the text language for the benefit of screen readers or other automated software.
For quotations, use {{quote}}
or a more extensive quotation template. For collocations, use {{coi}}
or {{co}}
. See WT:USEX for some general guidelines regarding usage examples.
|1=
en
for English; see WT:LANGLIST for the full list.|2=
|3=
, |translation=
or |t=
|tr=
or |transliteration=
|sc=
|inline=
auto
, auto-determines whether to display the entire usage example (including example, transliteration, translation, etc.) inline (on a single line) or multiline (using multiple lines, one each for the example, transliteration, translation, and other displayed values). The algorithm for doing this is currently quite basic. It simply counts the total number of displayed characters in the inline format (counting Asian-language, specifically CJK, characters twice), and if it is > 100, the multiline format is used, otherwise the inline format is used. If set to 1
, yes
, y
, true
, on
, or certain other similar values, the inline format is always used. Otherwise, the multiline format is always used. See also {{uxi}}
, which always uses the inline format.|q=
, |qN=
or |qualifier=
, |qualifierN=
|footer=
|ref=
|audio=
|lit=
|subst=
FROM//TO
(FROM/TO
is also accepted), where FROM
is the source text as found in the example, and TO
is the corresponding respelling in the source script (e.g. Cyrillic, Hebrew or Devanagari). The substitutions are applied in order and before transliteration. The idea is to phonetically respell words with irregular transliteration so that the transliteration comes out correctly, without the need to manually transliterate the entire example using |tr=
. Multiple substitutions are separated by a comma with no space after it: |subst=FROM1//TO1,FROM2//TO2,FROM3//TO3
. Note that FROM
and TO
are actually Lua patterns (see WT:LUA). This means, for example, that a hyphen in the source text needs to be "escaped" by writing it as %-
. See below for an example of using this parameter. Other examples may be found in the documentation for {{uxi}}
and {{quote}}
.|noenum=
#:
" for visual aesthetics.|nocat=
|sort=
Usage examples are normally preceded by "#:
", or by "#*
" or "#*:
" to hide the usage example (normally used for direct quotes).
On the page for Tajik китоб (kitob):
#: {{ux|tg|Ин '''китобро''' хондам.|I read this '''book'''.}}gives
On the page for Esperanto indiki, using |ref=
:
#: {{ux|eo|La forta vento '''indikas''' ke ŝtormo venas.|The strong wind '''indicates''' that a storm is coming.|ref=<ref>http://tatoeba.org/eng/sentences/show/454290</ref>}} ===References=== <references/>gives
References
On the page for Esperanto kiuj, using |ref=
:
# ({{plural of|eo|kiu}}) ] {{gloss|relative}} #: {{ux|eo|La elementoj '''kiuj''' troviĝis sur piratflagoj estis skeletkapo, la simbolo por la morto, skeleto indikis turmentan morton, sablohorloĝo indikis ke la tempo venis, sanganta koro malrapida kaj dolora morto kaj ponardo aŭ maĉeto signifis impulso por batali. |The elements '''which''' were found on pirate flags were: skull, the symbol for death, skeleton indicated torturous death, hourglass indicated that the time came, bleeding heart → slow and painful death and dagger or machete signified impulse for battle. |ref=<sup></sup>}}gives
On the page for Esperanto kelkaj, using {{uxi}}
:
# {{inflection of|eo|kelka||p}} ## ] ## ] ##: {{uxi|eo|'''Kelkaj''' el iliaj ovoj estas malbonaj.|'''Several''' of their eggs are bad.}}gives
On the page for Russian вследствие (vsledstvije), using |subst=
:
#: {{ux|ru|Полице́йские огороди́ли середи́ну шоссе́ на гора́х, '''всле́дствие чего́''' бегле́ц был на во́ле.|Police officers blocked the middle of the highway '''as a consequence that''' a fugitive was on the loose.|subst=шоссе́//шоссэ́}}gives
On the page for Russian устав (ustav), using |lit=
and |q=
:
#: {{ux|ru|] ] ] ] ] '''уста́вом''' ] ]|]|lit=You don't go to another monastery with your own '''charter'''|q=proverb}}gives
On the page for Hindi परंपरागत (paramprāgat), using |subst=
:
#* {{quote|hi|इसके बाद आयोजकों ने '''परंपरागत''' लोकनृत्य के साथ मेले का शुभारंभ किया।|After this the organizers started the festival with a '''traditional''' folk dance.|subst=परंपरागत//परंप*रागत}}gives
On the page for Portuguese chegar, using |qualifier=
to add a qualifier:
#* {{ux|pt|Em algumas horas '''chegaremos''' em Londres.|qualifier=Brazil|t=In a few hours '''we will arrive''' at London.}}gives
{{uxi}}
– used for inline usage examples{{uxa}}
– used for usage examples with automatic inline determination{{quote}}
– used for quotations{{co}}
, {{coi}}
, {{coa}}
– used for collocations{{rfex}}
– to request an example{{afex}}
, {{affixusex}}
– usage example specifically for affix entries (prefixes, suffixes, etc.){{sufex}}
, {{suffixusex}}
– usage example only for suffix entries{{prefex}}
, {{prefixusex}}
– usage example only for prefix entriesTemplateData for ux
This is used to show usage examples (not quotations) following a definition line.
Parameter | Description | Type | Status | |
---|---|---|---|---|
language code | 1 | The language code of the example to be shown
| String | required |
example | 2 | The example to be shown. Use '''bold''' to highlight the current term.
| String | required |
translation | 3 t translation | The English translation for examples on foreign entries. Use '''bold''' to highlight the current term's translation.
| String | optional |
transliteration | tr transliteration | The Latin transliteration for examples in non-Latin script. | String | optional |
script code | sc | The script code, required for certain languages with multiple possible scripts.
| String | optional |
inline | inline | Set to 1 to include the translation and any transliteration in the same line as the example. Transliterations are set off using parens and translations using an em dash. Set to 'auto' to auto-determine whether to display inline or multiline.
| Number | optional |
qualifier | q qualifier | To qualify an example with a region or register, or a type of usage.
| String | optional |
reference | ref | To include a reference or link to an originating external site. | URL | optional |
literal translation | lit | A literal translation of an idiomatic expression in a foreign language.
| String | optional |
substitution | subst | Substitutions to be applied to handle irregular transliterations in certain languages (e.g. Russian and Yiddish; see example above). If specified, should be one or more substitution expressions separated by commas, where each substitution expression is of the form FROM//TO (FROM/TO is also accepted), where FROM is a Lua pattern and TO is the corresponding replacement expression (see ]). The substitutions are applied in order and before transliteration; hence both FROM and TO should be in the source script (e.g. Cyrillic or Hebrew).
| String | optional |
noenum | noenum | To use in unnumbered sections (not following a definition). It may start the line following the definition or may be prefixed by "<code>#:</code>" for visual aesthetics. | Boolean | optional |
nocat | nocat | Don't add categories | Boolean | optional |