iso-codes 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +1 -3
- data/VERSION +1 -1
- data/iso-codes.gemspec +21 -28
- data/lib/iso-639-3-macrolanguages_20100128.tab.gz +0 -0
- data/lib/iso-639-3_20110525.tab.gz +0 -0
- data/lib/iso_codes.rb +6 -1
- metadata +9 -15
- data/README.todo +0 -39
- data/TODO +0 -49
- data/lib/iso-639-3_20100707.tab.gz +0 -0
data/Rakefile
CHANGED
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.2.
|
|
1
|
+
0.2.1
|
data/iso-codes.gemspec
CHANGED
|
@@ -1,48 +1,41 @@
|
|
|
1
1
|
# Generated by jeweler
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
|
-
s.name =
|
|
8
|
-
s.version = "0.1
|
|
7
|
+
s.name = "iso-codes"
|
|
8
|
+
s.version = "0.2.1"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Marius L. J\303\270hndal"]
|
|
12
|
-
s.date =
|
|
13
|
-
s.description =
|
|
14
|
-
s.email =
|
|
12
|
+
s.date = "2011-11-09"
|
|
13
|
+
s.description = "A database of ISO language and script codes."
|
|
14
|
+
s.email = "mariuslj (at) ifi [dot] uio (dot) no"
|
|
15
15
|
s.extra_rdoc_files = [
|
|
16
|
-
"README.rdoc"
|
|
17
|
-
"README.todo"
|
|
16
|
+
"README.rdoc"
|
|
18
17
|
]
|
|
19
18
|
s.files = [
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"lib/iso_codes.rb",
|
|
29
|
-
"test/test_iso_codes.rb"
|
|
30
|
-
]
|
|
31
|
-
s.homepage = %q{http://github.com/mlj/iso-codes}
|
|
32
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
|
33
|
-
s.require_paths = ["lib"]
|
|
34
|
-
s.rubyforge_project = %q{iso-codes}
|
|
35
|
-
s.rubygems_version = %q{1.3.6}
|
|
36
|
-
s.summary = %q{ISO language and script code support}
|
|
37
|
-
s.test_files = [
|
|
19
|
+
"CHANGELOG",
|
|
20
|
+
"README.rdoc",
|
|
21
|
+
"Rakefile",
|
|
22
|
+
"VERSION",
|
|
23
|
+
"iso-codes.gemspec",
|
|
24
|
+
"lib/iso-639-3-macrolanguages_20100128.tab.gz",
|
|
25
|
+
"lib/iso-639-3_20110525.tab.gz",
|
|
26
|
+
"lib/iso_codes.rb",
|
|
38
27
|
"test/test_iso_codes.rb"
|
|
39
28
|
]
|
|
29
|
+
s.homepage = "http://github.com/mlj/iso-codes"
|
|
30
|
+
s.require_paths = ["lib"]
|
|
31
|
+
s.rubyforge_project = "iso-codes"
|
|
32
|
+
s.rubygems_version = "1.8.11"
|
|
33
|
+
s.summary = "ISO language and script code support"
|
|
40
34
|
|
|
41
35
|
if s.respond_to? :specification_version then
|
|
42
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
|
43
36
|
s.specification_version = 3
|
|
44
37
|
|
|
45
|
-
if Gem::Version.new(Gem::
|
|
38
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
|
46
39
|
else
|
|
47
40
|
end
|
|
48
41
|
else
|
|
Binary file
|
|
Binary file
|
data/lib/iso_codes.rb
CHANGED
|
@@ -8,7 +8,7 @@ require 'zlib'
|
|
|
8
8
|
module ISOCodes
|
|
9
9
|
# Version of the ISO 639-3 code set supported (see
|
|
10
10
|
# http://www.sil.org/iso639-3/download.asp).
|
|
11
|
-
ISO_639_3_VERSION = '
|
|
11
|
+
ISO_639_3_VERSION = '20110525'
|
|
12
12
|
|
|
13
13
|
# Version of the ISO 639-3 macrolanguage mappings supported (see
|
|
14
14
|
# http://www.sil.org/iso639-3/download.asp).
|
|
@@ -79,6 +79,11 @@ module ISOCodes
|
|
|
79
79
|
end
|
|
80
80
|
|
|
81
81
|
class << self
|
|
82
|
+
# Returns an array containing all ISO 639-3 language codes.
|
|
83
|
+
def all_iso_639_3_codes
|
|
84
|
+
@@iso_639_3.keys
|
|
85
|
+
end
|
|
86
|
+
|
|
82
87
|
# Returns an object describing the language identified by the language
|
|
83
88
|
# code +code+.
|
|
84
89
|
def find_language(code)
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: iso-codes
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
5
|
-
prerelease:
|
|
4
|
+
hash: 21
|
|
5
|
+
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 2
|
|
9
|
-
-
|
|
10
|
-
version: 0.2.
|
|
9
|
+
- 1
|
|
10
|
+
version: 0.2.1
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- "Marius L. J\xC3\xB8hndal"
|
|
@@ -15,8 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-
|
|
19
|
-
default_executable:
|
|
18
|
+
date: 2011-11-09 00:00:00 Z
|
|
20
19
|
dependencies: []
|
|
21
20
|
|
|
22
21
|
description: A database of ISO language and script codes.
|
|
@@ -27,8 +26,6 @@ extensions: []
|
|
|
27
26
|
|
|
28
27
|
extra_rdoc_files:
|
|
29
28
|
- README.rdoc
|
|
30
|
-
- README.todo
|
|
31
|
-
- TODO
|
|
32
29
|
files:
|
|
33
30
|
- CHANGELOG
|
|
34
31
|
- README.rdoc
|
|
@@ -36,12 +33,9 @@ files:
|
|
|
36
33
|
- VERSION
|
|
37
34
|
- iso-codes.gemspec
|
|
38
35
|
- lib/iso-639-3-macrolanguages_20100128.tab.gz
|
|
39
|
-
- lib/iso-639-
|
|
36
|
+
- lib/iso-639-3_20110525.tab.gz
|
|
40
37
|
- lib/iso_codes.rb
|
|
41
38
|
- test/test_iso_codes.rb
|
|
42
|
-
- README.todo
|
|
43
|
-
- TODO
|
|
44
|
-
has_rdoc: true
|
|
45
39
|
homepage: http://github.com/mlj/iso-codes
|
|
46
40
|
licenses: []
|
|
47
41
|
|
|
@@ -71,9 +65,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
71
65
|
requirements: []
|
|
72
66
|
|
|
73
67
|
rubyforge_project: iso-codes
|
|
74
|
-
rubygems_version: 1.
|
|
68
|
+
rubygems_version: 1.8.11
|
|
75
69
|
signing_key:
|
|
76
70
|
specification_version: 3
|
|
77
71
|
summary: ISO language and script code support
|
|
78
|
-
test_files:
|
|
79
|
-
|
|
72
|
+
test_files: []
|
|
73
|
+
|
data/README.todo
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
== Coverage
|
|
2
|
-
|
|
3
|
-
The database currently includes codes for the following domains
|
|
4
|
-
|
|
5
|
-
* languages: two letter (`alpha-2') and three letter (`alpha-3') ISO codes,
|
|
6
|
-
and human readable names in English and, for a subset, in French.
|
|
7
|
-
|
|
8
|
-
* scripts: four letter (`alpha-4') and numeric ISO codes, and human readable
|
|
9
|
-
names in English and French.
|
|
10
|
-
|
|
11
|
-
=== Standards
|
|
12
|
-
|
|
13
|
-
* languages:
|
|
14
|
-
|
|
15
|
-
- ISO 639-1
|
|
16
|
-
|
|
17
|
-
- ISO 639-2:1998 Codes for the representation of names of languages-- Part 2: alpha-3 code.
|
|
18
|
-
|
|
19
|
-
Registration authority: http://www.loc.gov/standards/iso639-2/
|
|
20
|
-
Last update: 2008-07-08 (http://www.loc.gov/standards/iso639-2/php/code_changes.php)
|
|
21
|
-
|
|
22
|
-
- ISO 639-3:2007 Codes for the representation of names of languages -- Part 3: Alpha-3 code for comprehensive coverage of languages
|
|
23
|
-
|
|
24
|
-
Registration authority: http://www.sil.org/iso639-3/
|
|
25
|
-
Last update: 2008-07-11
|
|
26
|
-
|
|
27
|
-
- RFC 4646 and RFC 4647 (which together obsoleted RFC 3066 and RFC 1766)
|
|
28
|
-
|
|
29
|
-
Language subtag registry: http://www.iana.org/assignments/language-subtag-registry
|
|
30
|
-
Last update: 2008-07-23
|
|
31
|
-
|
|
32
|
-
* scripts:
|
|
33
|
-
|
|
34
|
-
- ISO 15924:2004 Codes for the representation of names of scripts
|
|
35
|
-
|
|
36
|
-
Registration authority: http://unicode.org/iso15924/
|
|
37
|
-
Last update: 2007-11-26 (http://unicode.org/iso15924/codechanges.html)
|
|
38
|
-
|
|
39
|
-
== License
|
data/TODO
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
= iso-codes
|
|
2
|
-
|
|
3
|
-
These files may be used to download the list of language codes with their language names, for example into a database. To read the files, please note that one line of text contains one entry. An alpha-3 (bibliographic) code, an alpha-3 (terminologic) code (when given), an alpha-2 code (when given), an English name, and a French name of a language are all separated by pipe (|) characters. If one of these elements is not applicable to the entry, the field is left empty, i.e., a pipe (|) character immediately follows the preceding entry. The Line terminator is the LF character.
|
|
4
|
-
|
|
5
|
-
A comprehensive database of ISO codes.
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
While most languages are given one code by the standard, twenty of the languages described have two three-letter codes, a "bibliographic" code (ISO 639-2/B), which is derived from the English name for the language and was a necessary legacy feature, and a "terminological" code (ISO 639-2/T), which is derived from the native name for the language. Each of these twenty languages is also included in the ISO 639-1 standard. (There were 22 B codes; scc and scr are now deprecated.)
|
|
9
|
-
|
|
10
|
-
In addition, there are codes for special situations:
|
|
11
|
-
|
|
12
|
-
* mis is listed as "uncoded languages"
|
|
13
|
-
* mul (for multiple languages) is applied when several languages are used and it is not practical to specify all the appropriate language codes
|
|
14
|
-
* The interval from qaa to qtz is reserved and is not used in the standard
|
|
15
|
-
* und (for undetermined) is used in situations in which a language or languages must be indicated but the language cannot be identified.
|
|
16
|
-
* zxx is listed in the code list as "no linguistic content" (added 2006-01-11)
|
|
17
|
-
|
|
18
|
-
Some ISO 639-2 codes that are commonly used for languages do not precisely represent a particular language or some related languages (as the above macrolanguages). They are regarded as collective languages (or collectives) and are excluded from ISO 639-3.
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
CREATE TABLE ISO_639-3_Names (
|
|
22
|
-
Id char(3) NOT NULL, -- The three-letter 639-3 identifier
|
|
23
|
-
Print_Name varchar(75) NOT NULL, -- One of the names associated with this identifier
|
|
24
|
-
Inverted_Name varchar(75) NOT NULL) -- The inverted form of this Print_Name form
|
|
25
|
-
|
|
26
|
-
CREATE TABLE ISO_639-3_Macrolanguages (
|
|
27
|
-
M_Id char(3) NOT NULL, -- The identifier for a macrolanguage
|
|
28
|
-
I_Id char(3) NOT NULL, -- The identifier for an individual language
|
|
29
|
-
-- that is a member of the macrolanguage
|
|
30
|
-
I_Status char(1) NOT NULL) -- A (active) or R (retired) indicating the
|
|
31
|
-
-- status of the individual code element
|
|
32
|
-
|
|
33
|
-
* countries and regions:
|
|
34
|
-
|
|
35
|
-
- ISO 3166-1 Codes for the representation of names of countries and their subdivisions – Part 1: Country codes,
|
|
36
|
-
ISO 3166-2 Codes for the representation of names of countries and their subdivisions – Part 2: Country subdivision codes,
|
|
37
|
-
ISO 3166-3 Codes for the representation of names of countries and their subdivisions – Part 3: Code for formerly used names of countries
|
|
38
|
-
|
|
39
|
-
Maintenance agency: http://www.iso.org/iso/country_codes
|
|
40
|
-
Last update: 2008-04-25 (http://www.iso.org/iso/country_codes/check_what_s_new.htm)
|
|
41
|
-
|
|
42
|
-
* currencies:
|
|
43
|
-
|
|
44
|
-
- ISO 4217:2008 Codes for the representation of currencies and funds
|
|
45
|
-
ISO 4217:2001 Codes for the representation of currencies and funds
|
|
46
|
-
|
|
47
|
-
Maintenance agency: http://www.bsi-global.com/en/Standards-and-Publications/Industry-Sectors/Services/BSI-Currency-Code-Service/
|
|
48
|
-
|
|
49
|
-
|
|
Binary file
|