Template:Pinyin

☆ Save On Wikipedia ↗

{{{1}}}

Template documentation

This template converts Hanyu Pinyin input from the "lazy" numbers form (e.g. Han4yu3 pin1yin1) to the proper form with tones marked on the correct vowels (e.g. Hànyǔ pīnyīn) according to the rules of pinyin.

Additionally, the module converts the convenient shorthand v to ü as in most Chinese pinyin IMEs, and the incorrect nue and lue to nüe and lüe respectively. Otherwise, the module does not check whether the input pinyin is entered correctly or not.

Also supports putting the accent on esoteric pinyin like on m, ng, and ê. (e.g. ng4 gives ǹg)

Usage

{{subst:pinyin|input}}
  • input - The values to convert to proper pinyin form. As input, the pinyin for individual characters has to be in the form untoned pinyin + tone number with no spaces between them (e.g. ma1), though there is no limitation on how many words to take as input and whether there are spaces between individual characters.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Pinyin in articles based on its TemplateData.

TemplateData for Pinyin

This template converts Hanyu Pinyin input from the "lazy" numbers form (e.g. Han4yu3 pin1yin1) to the proper form with tones marked on the correct vowels (e.g. Hànyǔ pīnyīn) according to the rules of pinyin. Should be substituted!

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Text with tone numbers1 text

Pinyin with tone numbers to convert to diacritic marks

Example
Han4yu3 pin1yin1
Linerequired

See also

  • {{Lang-zh}}  for displaying various varieties of Chinese, in various orthographies