As an anonymous user, you can only add new data. If you would like to also modify existing data, please create an account and indicate your languages on your user page.

Help:Language table

From OmegaWiki
Jump to: navigation, search
Help:Index Database layout Language table



The Language table defines the languages that are editable in OmegaWiki (i.e. for which we can add translations and definitions). The names of the language are to be found in the Language Names table.

+----------------+-------------+------+-----+---------+----------------+
| Field          | Type        | Null | Key | Default | Extra          |
+----------------+-------------+------+-----+---------+----------------+
| language_id    | int(10)     | NO   | PRI | NULL    | auto_increment | 
| dialect_of_lid | int(10)     | NO   |     | 0       |                | 
| iso639_2       | varchar(10) | YES  |     | NULL    |                | 
| iso639_3       | varchar(10) | YES  |     | NULL    |                | 
| wikimedia_key  | varchar(10) | YES  |     | NULL    |                | 
+----------------+-------------+------+-----+---------+----------------+

Fields[edit]

language_id 
An id that identifies the language (primary key)
dialect_of_lid 
A link to another language if the current language is a dialect of a larger language. This is not used at the moment.
iso639_2 
The ISO 639-2 code for that language if it exists. Might be NULL
iso639_3 
The ISO 639-3 code for that language if it exists, and another code if it does not exist. It should not be null, and should be unique.
wikimedia_key 
The code that is used for that language in the Wikimedia sites (such as Wikipedia), if it exists. It is used to establish a correspondance between the (Mediawiki) user interface languages and the OmegaWiki languages.

Sample SQL Queries[edit]

Knowing the DefinedMeaning corresponding to a language_id[edit]

For example with language_id = 85 (English)
collection_id = 145264 corresponds to the collection iso639_3
select member_mid as definedmeaning_id
from language, uw_collection_contents
where language.language_id = 85
and language.iso639_3 = uw_collection_contents.internal_member_id 
and uw_collection_contents.collection_id = 145264 ;

The returned value, 5685 corresponds to the DM for English (cf. DefinedMeaning:English_(5685) )