Extension:Babel/zh

Babel擴展插件添加解析器函数以替換完全依賴模板的“舊”语文系統. “ 如果指定了無法識別的語言參數，則它將查看是否存在具有該名稱的現有模板並包括該模板.

在维基媒体项目中，名词“Babel”（Tower of Babel）指的是用户页面上的文本，它帮助人们更容易地与说某种语言的人联系，从而帮助多语言交流. 这个想法起源于Wikimedia Commons，并已在许多其他wiki上实现.

用法
解析器函数的语法如下:

为您所说或理解的每种语言添加以下代码之一，以 分隔，其中 是该语言的MediaWiki语言代码、ISO639-1代码或ISO639-3代码. 每个代码级别的一般用法如下:


 * ：如果您对此种语言一窍不通.
 * ：初级水平——您对此种语言的写作或会话略懂一二.
 * ：中等水平——足以进行编辑或讨论.
 * ：高等水平——尽管你可以使用此种语言进行完整的写作，但仍可能出现一些细小的错误.
 * ：近母语水平——虽然此种语言不是你的母语，但你基本可以达到母语者的水平.
 * ：专业水平.
 * 或 ：您是这种语言的母语用户，您天生就可以使用该语言的俗话和/或俚语.

要包含任何其他模板，只需添加该模板的名称，例如，如果要包含 ，请. 根据本地配置，可以将前缀或后缀添加到模板名称（例如， ）中，这可用于限制选择和缩短参数的长度； 例如， 可以包括 ，如果以这种方式配置的话.

要删除页眉和页脚，请使用 作为第一个参数，例如. 这使得更容易与其他用户框一起使用语文.

配置参数
语文有六个可以在 中修改的配置参数.


 * :（字符串）语言代码数据库文件的路径，默认值应该足够了.


 * : (string) the path of the language name database file, the default should suffice.


 * : (array of string or boolean, indexed by the strings "1", "2", … "5", "N") where each entry is the name of a category for the skill level indicated by its index, possible variable elements are:  (language code),   (the name of the language in the wiki's content language), and   (the name of the language in its language). To disable adding a category for a particular level, set the corresponding value to false.


 * 例如：


 * will use categories like "Category:User en-0" and "Category:User fr-N". The default is just "Category:Fr-N" and so on.


 * : (string) Name of the main (non-level) category for each language, to which all users of that language are added. Set to false to disable; defaults to format "Category:Fr". It accepts the same format as  above. Example:


 * : (string) Default ability level to use when none is specified, should be an index from, that is one of the strings "1", "2", … "5", "N". Default is "N".


 * : (boolean) Whether to use the user interface language for the header and footer message. If false (default), it will be in the page content language. This is because using the user interface language may fragment the parser cache.

系统消息
Several customizations can also be made using MediaWiki namespace messages.


 * MediaWiki:babel-template " "
 * The format of template names when one is being included.


 * MediaWiki:babel-portal " "
 * The format of the target of the link from the language code.


 * MediaWiki:Babel-autocreate-user " "
 * Username to be used for autocreation of Babel related categories


 * MediaWiki:babel-autocreate-text-levels " "
 * Text to insert into auto-created categories for different language levels. You have to change this if you want them to be auto-categorized in the main category of the respective language.


 * MediaWiki:babel-autocreate-text-main " "
 * Text to insert into auto-created categories for non-level categories. You have to change this if you want them to be auto-categorized in a parent category for all languages.


 * MediaWiki:babel " "
 * babel框的页顶


 * MediaWiki:babel-url " "
 * The pagename where information on the babel extension can be found


 * MediaWiki:Babel-footer " "
 * babel框的页脚


 * MediaWiki:babel-footer-url " "
 * The page to link to in the footer of the babel box