User:Cscott/Draft:Chinese LanguageConverter

Chinese Wikipedia is an automatic conversion of Chinese Wikipedia, the purpose is to computer programs to adapt to different word mode differences.

Chinese Wikipedia readers and editors come from all over the world. There are many differences in the nature of the Chinese they need or contribute, such as differences between simplified and traditional characters, differences in vocabulary between regions , differences in written language caused by differences in dialects , and so on. MediaWiki brings these Chinese characters together, called "word mode". It can be said that a word pattern is a collection of certain Chinese characters. In order to integrate the diverse resources of the reader and the editor, and in order to promote the exchange of the parties, the encyclopedia does not regulate the reader or editor to use what word mode, but try to automatically convert the computer program to adapt to these differences, so that editors can To use their own words to provide information, but also allow readers to choose the desired information word words. So there are special things to keep in mind when editing and reading Chinese Wikipedia. In fact, even this page try to explain the matter, there are many ambiguities.

Automatic conversion with word mode is related to the principle of the wiki system itself. Most editors enter the article content of the system, including text and wiki grammar, etc., which is called source . The wiki system usually retains intact source code and does not automatically convert. Readers use the wiki system, not directly read the source code, but by the system will automatically convert the source code into the appropriate form, such as adding pictures, hyperlinks and so on. And the Chinese Wikipedia word mode conversion is a number of automatic conversion program in a. The ability to automatically convert a computer program is not just an encyclopedia entry, but also a page category.

Most of the time (the default), the wiki program is converted according to the conversion table. In some cases, it is automatically converted according to the way the editor specified in the source code, including no conversion or so-called "manual conversion". The conversion table is a table that lists the correspondence between the various word patterns, the word and the word, or the word and the word. Currently only the administrator can edit the conversion table. The so-called "manual conversion" is still the wiki system in the use of the reader immediately when the automatic conversion, but this time the program is based on the editor in the source code specified in the way priority. Editors can edit the archive and switch to other word mode to view the situation.

Select [edit] with word mode
Chinese encyclopedia system to support the Chinese zh (Chinese characters), zh-hant (body / traditional word), zh-tw (Taiwan word), zh-hk (Hong Kong word), zh-mo (Macau word ), and zh-hans (Simplified use the word), zh-cn (mainland China use the word), zh-sg (Singapore use the word), zh-my (Malaysia with the word) nine kinds of words mode . However, the current Chinese Wikipedia has only enabled zh-tw (Taiwanese words), zh-hk (Hong Kong words), zh-mo (zhang zhang), zh-sg (hong kang zhang) and zh-cn (China The Chinese word), zh (Chinese characters), zh-hant (traditional word), zh-hans (simplified characters) three need to register after the parameters set to select the gadget to display, zh-my ( Malaysian word) has been covered by zh-sg (Singapore word) and is not enabled. To support more word mode need to modify the program, if there is a real need to ask in the discussion page.

Article body is (bulk) body / simplified selection (by priority): In addition, different panels (Skin) have been added to the various word mode link, such as the current Vector panel, the link is in the page discussion page link, use the drop-down menu to select. The previous MonoBook panel link is at the top right of the article. The name of the link can be modified via MediaWiki: variantname-zh-tw / zh-cn , MediaWiki: variantname-zh-tw / zh-tw .
 * Everyone can put the URL of ( http://zh.wikipedia.org/wiki/ entry name) is  changed  . For the beginning of the page http://zh.wikipedia.org/w/index.php, can finally add in the URL of  (URL containing  a time) or  (URL does not contain  a time). Which  may be .
 * Subscribed users can choose different Chinese languages in their personal preferences ;
 * For anonymous users, the system is set according to the language required by the user's browser. See here ;
 * If none of the above settings are set, the default is not converted.

Interface with the word mode [ edit ]
The font mode of the interface is independent of the content of the article. In addition to the various Chinese word mode, you can also choose English, French and so on language. The interface mode is set in the personal preference of the logged in user.

Conversion Technology [ Edit ]
Technically, Wikipedia's word conversions are implemented in four levels: one is MediaWiki's built-in conversion table, ZhConversion.php, for global conversion of the Wikipedia program; the second is the definition of MediaWiki: Conversiontable Area word conversion table for the local Chinese Wikipedia local global conversion; the third is the public conversion group for the same theme areas and similar items unified conversion; the fourth is set within the entries of the manual conversion for the entry alone. Among them, the public conversion group and entries within the manual conversion of everyone can edit, and modify the local conversion table requires administrator privileges, modify the global conversion table need to submit to the MediaWiki repository code. Therefore, if you want to add or repair the global and local global conversion, the general user in the Wikipedia: word conversion request, by the administrator to help deal with.

Conversion table [ Edit ]
At present, the system default automatic conversion is based on several "conversion tables" . The conversion table is a form that records the correspondence between words and words or words and words. Also called the system default conversion table . At present, only the administrator can edit the custom conversion table, most people can apply to the administrator.

See: Wikipedia: Simplified translation request .

System default conversion table [ edit ]
The system default conversion table exists in the mediawiki program: See Wikipedia: Simplified and Multi-Correspondence Checklist and Wikipedia: Simplify Multiple Checklists .
 * Phab: source / mediawiki / browse / master / languages ​​/ data / ZhConversion.php

Custom conversion table [ edit ]
Administrators can use Mediawiki: Conversiontable / zh-hans , Mediawiki: Conversiontable / zh-hant , Mediawiki: Conversiontable / zh-cn , Mediawiki: Conversiontable / zh-tw , Mediawiki: Conversiontable / zh-sg, and Mediawiki: Conversiontable / en -hkto customize the conversion table. Ordinary users can make suggestions for modifying conversion tables in Wikipedia: Simplified translation requests . Custom conversion tables can be used to correct errors in the system default conversion table. These pages can be written like other pages, but describe the conversion relationship in the following format: Queen => queen Bosnia => Bosnia; Sarajevo => Sarajevo // Sarajevo's translation; ... For convenience of display, each should be preceded by an asterisk (*) or a pound sign (#). Note that each conversion relationship should be terminated with "//".

Conversiontable / zh-page page for conversion to zh-cn, Conversiontable / zh-tw page for conversion to zh-tw, and so on.

After these pages are updated, their effects are not always visible, because some pages may be placed in the page cache. To see the immediate effects can be used to edit the preview function.

About - {} - tag [ edit ]
For example: "Leslie has studied at the University of Leeds in the UK ." Used - {} - the mark is - {en: Leeds; zh-hans: Leeds; zh-hk: Lees; zh-tw: }-the University

See "Blocking the automatic conversion of a text label" on this page.

- {} - tags are now fully supported for linking, templates, and image conversions. Please use  for conversion of HTML attributes .

Source code generally do not convert [ edit ]
Most editors enter the article content of the system, including text and wiki grammar, etc., which is called source . The wiki system usually retains intact source code and does not automatically convert the source code.

The problem with the automatic conversion program [ edit ]
'''Note: Chinese Wikipedia does not guarantee the use of word mode automatically convert programs and content of the correctness. Automatic conversion with word mode is not necessarily correct, and even can be said that the most automatic conversion problems.'''

The conversion program uses the simplest "maximum match" to convert. This leads to the following error: Suppose there is a correspondence in the conversion table Memory => memory The following sentence is used to convert Human memory in many microorganisms Based on the maximum match, the system will "memory" to convert, get "memory". The whole sentence will be mistakenly converted into Human body memory in many microbes The fundamental way to solve this problem is to use intelligent word matching, the above sentence is split into There are many microbes in the human body And then convert each word separately.

There are two ways to fix the above error before a system with this kind of intelligence is not implemented: This is the wrong word. Please pay more attention when reading this encyclopedia. Encountered a suspicious section can go to the editor page to check the source code, or pay attention to the different word mode between the conversion relationship to develop their own "reverse conversion" ability.
 * 1) Handmade the words that will be related to the wrong word: the human body - {} - there are many microbes
 * 2) Will be involved in the wrong word multiple words as a whole added to the custom conversion table, such as "in vivo existence => body exists." (Note: At present, only the administrator can edit the conversion table, most people can apply to the administrator.)

Control the code for automatic conversion [ edit ]
For special needs, you can use the following syntax to set the auto conversion, or "manual conversion" .

Set the so-called "manual conversion", in fact, the wiki system will still be used by the reader according to the system default conversion table for automatic conversion, but then the system will be in the source code specified in the source (add) to convert, and the editor's The method precedes the way listed in the conversion table. That is, by the editor to add their own way of conversion.

Commonly used conversion tool syntax [ edit ]
See Also: Help: Word Conversion Syntax
 * Prohibit the automatic conversion of a text label :
 * Effect: text
 * For  the text in the conversion rules (such as: "zh: Chinese"), but want to remain the same, you can use:
 * Effect: text
 * Prohibit the automatic conversion of a piece of text as a whole Tags :
 * But the text on both sides of - {} - is still worded. In essence, cut off the text, respectively, conversion.
 * effect:
 * Traditional: Old - {} - Jinshan, Hong Kong - {San Francisco}.
 * Simplified: Old - {} - Jinshan, Hong Kong - {San Francisco}.
 * Manually convert a text of the label (local self-added conversion method label):
 * Effect: text 1
 * Full-text manual conversion label (comprehensive self-added conversion label):
 * Effect: text 1
 * Hidden full-text manual conversion label (comprehensive self-added conversion label):
 * Effect: text 1
 * Manually delete the conversion label (remove a rule from the global conversion table, and no longer convert it to that rule):
 * Effect: text 1
 * Entry title manual conversion label :
 * or
 * Conversion rule description tag (which is displayed in a user-friendly way):
 * Hong Kong: text 6; Singapore: text 7; Macau: text 8; Hong Kong: text 6; Singapore: text 7; Macau: text 8;
 * Use the word name name tag (convert a language code into text):
 * Effect: Hong Kong
 * To the specified language (with  fallback  restrictions, MediaWiki 1.15 new features):
 * Effect: text
 * This feature can be used where you need to avoid word conversions, but allow for simple conversions. Such as.
 * Full conversion is forbidden :
 * or
 * Entry header prohibited automatic conversion :
 * Hong Kong: text 6; Singapore: text 7; Macau: text 8; Hong Kong: text 6; Singapore: text 7; Macau: text 8;
 * Use the word name name tag (convert a language code into text):
 * Effect: Hong Kong
 * To the specified language (with  fallback  restrictions, MediaWiki 1.15 new features):
 * Effect: text
 * This feature can be used where you need to avoid word conversions, but allow for simple conversions. Such as.
 * Full conversion is forbidden :
 * or
 * Entry header prohibited automatic conversion :
 * Full conversion is forbidden :
 * or
 * Entry header prohibited automatic conversion :

Entry title [ edit ]
Sometimes the title of the article does not need to be converted, such as words in the wiki dictionary, or proprietary terms such as the ComputerWorld. In this case, you can either add one  or more in the article  (note both before and after the two underline) to prohibit the conversion of the title of the article. However, in Wikipedia, we do not recommend using these two tags because of possible differences between simple and diverse issues (such as "Computer World" and "Computer World News"). We recommend the use of  "conversion " below .

Note: This mark is placed at the beginning of the article.

In addition, MediaWiki software supports single user settings to prohibit their own when browsing the title conversion, also supports the whole station to prohibit the title conversion. A single user to prohibit the title of their own browsing, you can set the Special: parameter set in the "User Information" column in the "do not convert the link title" check box; a wiki site to prohibit all the title conversion (but enable the text Conversion), can be set in LocalSettings.php .

Sometimes the title of an article may contain words that vary widely from place to region or vary widely, but for some reason it is not appropriate to modify the conversion table to achieve the purpose of automatic conversion, usually because of some common words. If you hastily modify the conversion table, it may cause more places to produce errors. In this case there are two ways to deal with, we recommend the latter: Example: American politician John Kerry has a different translation of "John Kerry", "John Kelly" and "John Kerry", but if the "Kerry <=> Kelly" is exchanged in the conversion table, Then the European names "Crimea" and "Kremlin" will become "Kelimiya" and "Kailimulin Palace" error situation, in order to avoid creating more confusion, this situation is more suitable for John Kerry In the entry with the manual conversion label to correct the title and the relevant part of the relevant translation.
 * 1) Use the title conversion in the article to indicate the correct display of the title:  or .
 * 2) Use the full text in the article to manually convert:  or .

Note: This tag simply indicates the conversion of the title when the article is displayed, and can not automatically handle the conversion at the time of the link. So use this mark to remember to redirect the same title to the article with the same title. Such as John Kelly .

Full text does not allow automatic conversion [ edit ]
Sometimes articles throughout the article need to be converted, for example, to discuss traditional / simplified articles. In this case, you can add one in the article  or  (note that both before and after the two underlined) to prohibit the conversion of the content of the article. However, in the Chinese Wikipedia, in order to facilitate readers to read around, we do not recommend prohibiting the conversion of words other than pages related to the full conversion of pages.

Note: This mark is placed at the beginning of the article.

Capacity range for automatic conversion [ edit ]
Many of the Wikipedia pages can be automatically converted. But there are many exceptions. For example, the recent update page Special: Recentchanges such a special page, there is a part of the conversion is not.

See Wikipedia: What is an entry ?

Page classification [ edit ]
At present, the ability to automatically convert computer programs is not just an encyclopedia entry, but also pages sorting and so on. Therefore, unless otherwise specified, the entry title or sub-category classification is based on the title after automatic conversion of the results to classify. However, in this automatic conversion is also different from other places, just a simple "simple conversion", and no further conversion.

Example: American political figures John Kerry respectively, "John Kerry", "John Kerry" and "John Kelly" different translation. The translation of the relationship has been added to the conversion table, and the entry of the source code is not specified in the non-conversion, so the reader uses the wiki system, not directly read the source code, but by the system will automatically convert the source code into the appropriate form. But in the page classification, the automatic conversion is also different from other places, just a simple "simple conversion", and no further conversion.

In Category page Category: American politicians among readers choose if mainland China with a word or Singapore with the word mode, you will see John Kerry entries categorized "about" under the word of John Kerry: The reader who chooses the word of Taiwan or the word of Hong Kong will see that the entry is under the word "about" in the body, but the entry name is John Kelly: Subclassing is the same.
 * http: //....Category: = en-US the Variant American Politics & CN
 * Http: //....Category: US politics & variant = zh- sg
 * Http: // rule Category: US politics & variant = zh- tw
 * Http: //....Category: US politics & variant = zh- hk

Software issues [ edit ]
January 2006 began a problem, may be related to the new version of MediaWiki . As long as the classification name is Traditional, the entry or sub-category will disappear from the parent classification, but the entry or sub-category page will be restored after any editing, but the system will disappear when the next link is updated. In addition, the classification can not use the redirection function.

See: page classification .

This issue was fixed in February 2009, but the redirection function is still not available for classification.

Internal link, URL, redirect and search [ edit ]
Although the source code is generally not converted. Only the program generated by the page has been converted. However, the "internal link" (not an external link or a normal URL, see Help link ) within the page received by the reader is not determined by the source code and is determined by the page generated by the program. In other words: the link will be affected by the automatic conversion of computer programs.
 * Ditto Example: From 2004 March 8 to 2005 March 26 before Wikipedia with only John Kerry entry, without Taiwan John Kerry entries with the word pattern, nor "John Kerry" heavy Directed to John Kerry . This time if the source code in  this code, then:

The ability to automatically convert a computer program does not include Wikipedia's URL and search functionality. Encyclopedia's system does not convert characters to Chinese characters (sometimes in the form of Punycode 's code), or the input query string.
 * If someone is browsing in a non- conversion mode, you can receive a "John Kelly" link to the John Kerry page (the system automatically adds the word "John Kelly" Kerry ").
 * If someone is using the "no conversion" mode to browse, then will receive the editor to be "John Kelly" (because the system directly connected to what did not have "John Kelly").
 * The same example: During this time, "John Kelly" is empty, whether it is an entry name or its associated URL (eg http://en.wikipedia.org/wiki/  John Kelly ). Until 2005, March 26 , Zhengzhu the "John Kerry" redirected to John Kerry , John Kerry this entry, as well as the associated URL only content.

The contents of the redirect page are not affected by the automatic conversion of the computer program.
 * The same example: Zhengzhu joined the redirect code as follows:


 * 1) REDIRECT John Kerry
 * This is not affected by the automatic conversion of the computer program. Please see http: //....title= John Kelly & redirect = no & variant = zh-tw

Encyclopedia entry name search ("entry") will be affected by the automatic conversion of the computer program.

Encyclopedia entry full text search ("search") will not be affected by automatic conversion of computer programs.

Encyclopedia of search engines such as Google may have its own automatic conversion of computer programs. Currently known search will be simple and simple conversion. When you need to create a simple redirect page, the way to create new entries often does not work.

How to create a simple redirect page [ edit ]
The logged-in user can use the Mobile Pages feature to create a redirection page. For example, suppose there is now an entry called "Shenyang" and you want to create a redirect page from "Shenyang" to "Shenyang", then you should move twice: The result will be "Shenyang" to maintain the original status, and "Shenyang" to point to "Shenyang" redirect page.
 * 1) Move "Shenyang" to "Shenyang".
 * 2) Move "Shenyang" to "Shenyang".

The second move seems superfluous, but will bring two benefits: Another simpler way is to check the "No conversion link title" in the parameter settings so that you can create the redirect page directly without having to move twice.
 * Respect for the entry to the participant - it is inappropriate to change the name of an entry without discussion .
 * Once the entry name changes, the link that originally pointed to the entry will point to the correct entry in a redirected way, but in the long run all redirect links should be replaced with direct links. Modifying all of these links will increase the maintenance costs of Wikipedia (especially Wikipedia in other languages ​​may also link to these pages through cross-language links ). It would be more efficient to keep the original name in the original name than the extra burden practice.

Tips for editing general articles [ edit ]
Note: If your browser is installed with Wen Tang and other Chinese character conversion software or can be character conversion of mobile applications, please turn it off when you edit or remove.
 * If there is no valid reason, please do not replace the traditional article in Simplified Chinese, or will be simplified as a traditional, this operation is complicated and destroyed !
 * Traditional and Simplified avoid confounding, or to Traditional / Simplified played Simplified / Traditional wording, the article title and content (including classification title) must be all simplified or traditional, for example, "Chinese history" (the correct wording is "Chinese history" or "Chinese history ") And" operating system "(correctly written as" operating system "or" operating system "), the system may not be able to make the correct conversion. If it is simple to convert (such as the former), may still be successful; but if the use of traditional text to play simplified vocabulary (such as the latter), the conversion is usually doomed to failure. In particular, the latter is basically a violation of the kind of destruction . As a result, users who do not use traditional Chinese characters are not allowed to use Simplified Chinese characters when they are familiar with entries (such as computer- related items) that are very easy to understand .


 * In the past many things have simplified two versions of different articles to introduce. It is now necessary to combine such articles by hand. See Wikipedia for details .


 * When you need to create a simple redirect page, the way to create new entries often does not work, then please refer to Wikipedia: Redirect # Chinese Simplified questions .