Template:Wp/nod/Xlit2

(Redirected from Template:Wp/nod/xlit2)
Template documentation[view] [edit] [history] [purge]

ᨿᩢ᩠ᨦᨷ᩵ᨸᩖᩯ

This template expands to a transliteration of the whole of the page into the Thai script. This transliteration is based on the historical correspondence of the letters, not on the modern sounds. Vowels are transliterated as a group. Thus ᨣᩤᩴᨾᩮᩬᩥᨦ is transliterated as คำเมือง.

Blocks of text may be excluded from such an expansion by including them in a pair {{ᩀ᩵ᩣᨪ᩶ᩣᩴ}} .. {{ᨿᩬᨾᨪ᩶ᩣᩴ}}. A single word or phrase may be included untransliterated by the template {{ᩀ᩵ᩣᨳᩬᨯ|ᨣᩤᩴ}}. A word that is difficult to transliterate may be enclosed in the template {{ᨿᩣ᩠ᨠ|ᨣᩤᩴ}} so that its transliteration may be looked up or specifically overridden. The value returned by {{ᨿᩣ᩠ᨠ}} is itself subject to transliteration.

Templates are expanded before transliteration occurs. So that they may choose the appropriate text for the environment, an extra, named argument ᩅᨳ (short for ᩅᩥᨵᩦ​ᨳᩬᨯ) is inserted in the template invocation on the page to advise the template as to how its output will be transliterated. Thus {{template|w1|w2}} will be expanded to {{template|ᩅᨳ=ᨠ|w1|w2}} The value of the argument is ᨠ to indicate that transliteration uses the etymological correspondences of letters. The value ᩈ is reserved for indicating that transliteration follows the principle of using Standard Thai consonant sounds. The empty string or no argument implies that the output will not be transliterated from the Tai Tham script. This insertion may fail if the the invocation is too complicated, for example if some of the arguments are themselves template expansions.

Templates should pass the argument ᩅᨳ down to the templates they themselves invoke if it may be relevant. Thus a template may invoke {{ᨿᩣ᩠ᨠ}} in the form {{ᨿᩣ᩠ᨠ|ᩅᨳ={{{ᩅᨳ|}}}|ᩉᩖ᩠ᩅᩢᨠ|ᨠ=หล็วก}} when in the main page one would simply use {{ᨿᩣ᩠ᨠ|ᩉᩖ᩠ᩅᩢᨠ|ᨠ=หล็วก}}.

For test cases, see Module:Translit2.