Manual:Langlinks table

{{TOCright}

}

langlinks table tracks .

This table is used for displaying pages, as a quick means to find the links that typically appear in the left margin, underneath the navigational and toolbox links.

Without this table, MediaWiki would have to parse through the wikitext for each page display.

The table has a primary key on page (ll_from) and target language (ll_lang), so each page can only store one link per language.

The table has three columns: ll_from (an integer), ll_lang (20 characters), ll_title (255 characters).

If the wiki page "Sweden" contains the interlanguage link  Suède , then ll_from will indicate the page Sweden where the link goes from, <tvar|2>ll_lang</> will be "<tvar|3>fr</>" and <tvar|4>ll_title</> will be "<tvar|5>Suède</>".

In February 2009 for the Swedish language Wikipedia, this table has 3.2 million rows, of which 145,000 (4.5 %) have <tvar|1>ll_lang</> "<tvar|2>fr</>".

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


 * Find out which are the most popular target languages:


 * Find out which pages have the most interlanguage links: ( But then you would need to translate ll_from into useful page names. )


 * 1>stats:EN/TablesDatabaseWikiLinks.htm</>|Interlanguage link statistics are included in the monthly Wikipedia statistics.

ll_from
<tvar|1></> of the referring page.

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

ll_title
of the target, including namespace (<tvar|2>FULLPAGENAMEE</> style).

Schema summary
<tt>DESCRIBE langlinks;</tt> +--+--+--+-+-+---+ +--+--+--+-+-+---+ +--+--+--+-+-+---+
 * Field   | Type             | Null | Key | Default | Extra |
 * ll_from | int(10) unsigned | NO   | PRI | 0       |       |
 * ll_lang | varbinary(20)    | NO   | PRI |         |       |
 * ll_title | varchar(255)    | NO   |     |         |       |

<tt>DESCRIBE langlinks;</tt> +--+-+--+-+-+---+ +--+-+--+-+-+---+ +--+-+--+-+-+---+
 * 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    |       |