Added language codes alongside the country codes.

Language codes are ISO 639-1; country codes are ISO 3166-1 alpha-2.

The country codes are important to keep for flags and stuff, I guess,
but reporting the language code as a short form for the language is
more correct.

Gonna see if I can do that, I guess.  I added the language codes mostly
just because I was adding languages.
This commit is contained in:
Zhorken 2010-03-15 23:24:29 -04:00
parent 1fcb06d64a
commit 419f65c90c
2 changed files with 10 additions and 7 deletions

View file

@ -1,7 +1,9 @@
id,iso3166,name
1,jp,Japanese
2,jp,Official Roomaji
3,kr,Korean
4,cn,Chinese
5,fr,French
6,de,German
id,iso639,iso3166,name
1,ja,jp,Japanese
2,ja,jp,Official Roomaji
3,ko,kr,Korean
4,zh,cn,Chinese
5,fr,fr,French
6,de,de,German
7,es,es,Spanish
8,it,it,Italian

1 id iso639 iso3166 name
2 1 ja jp Japanese
3 2 ja jp Official Roomaji
4 3 ko kr Korean
5 4 zh cn Chinese
6 5 fr fr French
7 6 de de German
8 7 es es Spanish
9 8 it it Italian

View file

@ -163,6 +163,7 @@ class Item(TableBase):
class Language(TableBase):
__tablename__ = 'languages'
id = Column(Integer, primary_key=True, nullable=False)
iso639 = Column(Unicode(2), nullable=False)
iso3166 = Column(Unicode(2), nullable=False)
name = Column(Unicode(16), nullable=False)