I’ve added a small Pinyin converter to the InScript plugin. Pinyin is a method of transliterating Chinese characters into the Roman alphabet. As Chinese is a tonal language, it is important that these tones are included in the pinyin. This is achieved through the use of accents and other marks over certain vowels.
The reason for the converter is that these accents are not easy to type, especially for people with keyboards in an accent-less language (i.e. English). It is possible to enter the characters using some form of character mapping tool, or by entering the HTML code directly, but this is not an intuitive method.
Instead, a popular technique used on many websites is to write the tone as a number. For example, zhong1guo2 would indicate that the ‘o’ in zhong needs the first tone applied, and ‘o’ in guo needs the second. While this is an easy method of entering the text, it does not look good, and is another layer to understanding the tones themselves.
The converter scans text for the tone numbers and replaces them with the correct HTML entities. An example of this is shown below.
Additionally, the ü character can be represented with v0, and tonalized with v1, v2, v3, and v4.
Because InScript is used the conversion can occur anywhere – one block of text, a whole post, or every post.
Currently the conversion is not perfect. Or rather, I am unsure if it is perfect as there may be certain rules for choosing which vowel to tonalize that I don’t know!
A much smaller addition to InScript has been a Google AdSense function. This inserts the code for Google AdSense wherever the tag is placed, and without WordPress mangling it with it’s default formatting. The function will also ensure that you don’t exceed Google’s requirements of a maximum of three adverts per page.