Manual:Langlinks table/zh

langlinks表跟踪.

此表用于显示页面，作为一种快速查找链接的方法，这些链接通常显示在导航链接和工具箱链接下方的左边距中. 如果没有这个表，MediaWiki将不得不为每个页面显示解析wikitext. 该表在页面(ll_from)和目标语言(ll_lang)上有一个主键，因此每个页面只能存储每种语言的一个链接.

该表有三列：ll_from(整数)、ll_lang(35个字符)、ll_title(255个字符). 如果维基页面“瑞典”包含中间语言链接 Suède ，则ll_from将指示链接所在的瑞典页面，ll_lang将是“fr”，ll_title将是“Suède”. In February 2009 for the Swedish language Wikipedia, this table has 3.2 million rows, of which 145,000 (4.5 %) have ll_lang "fr".

As a side effect of having this table, you can:

( But then you would need to translate ll_from into useful page names. )
 * Find out which are the most popular target languages:
 * Find out which pages have the most interlanguage links:
 * Interlanguage link statistics are included in the monthly Wikipedia statistics.

ll_from
of the referring page.

ll_lang
Language code of the target, in the ISO 639-1 standard.

ll_title
of the target, including namespace (FULLPAGENAMEE style).

Schema summary
+--+--+--+-+-+---+ +--+--+--+-+-+---+ +--+--+--+-+-+---+
 * Field   | Type             | Null | Key | Default | Extra |
 * ll_from | int(10) unsigned | NO   | PRI | 0       |       |
 * ll_lang | varbinary(35)    | NO   | PRI |         |       |
 * ll_title | varbinary(255)  | NO   |     |         |       |

+--+--+--+-+-+---+ +--+--+--+-+-+---+ +--+--+--+-+-+---+
 * Field   | Type             | Null | Key | Default | Extra |
 * ll_from | int(10) unsigned | NO   | PRI | 0       |       |
 * ll_lang | varbinary(20)    | NO   | PRI |         |       |
 * ll_title | varbinary(255)  | NO   |     |         |       |

+--+-+--+-+-+---+ +--+-+--+-+-+---+ +--+-+--+-+-+---+
 * Field   | Type                | Null | Key | Default | Extra |
 * ll_from | int(8) unsigned     | NO   | PRI | 0       |       |
 * ll_lang | varchar(10) binary  | NO   | PRI | NULL    |       |
 * ll_title | varchar(255) binary | NO  |     | NULL    |       |

Indexes
 +---++--+--+-+---+-+--++--++-+---+ +---++--+--+-+---+-+--++--++-+---+ +---++--+--+-+---+-+--++--++-+---+
 * Table    | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
 * langlinks |         0 | PRIMARY  |            1 | ll_from     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * langlinks |         0 | PRIMARY  |            2 | ll_lang     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * langlinks |         1 | ll_lang  |            1 | ll_lang     | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |
 * langlinks |         1 | ll_lang  |            2 | ll_title    | A         |           0 |     NULL | NULL   |      | BTREE      |         |               |