gettext 1.1.1 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (138) hide show
  1. data/ChangeLog +128 -0
  2. data/NEWS +10 -0
  3. data/README +21 -23
  4. data/Rakefile +39 -20
  5. data/bin/rgettext +1 -1
  6. data/bin/rmsgfmt +1 -1
  7. data/bin/rmsgmerge +1 -1
  8. data/data/locale/cs/LC_MESSAGES/rails.mo +0 -0
  9. data/data/locale/cs/LC_MESSAGES/rgettext.mo +0 -0
  10. data/data/locale/de/LC_MESSAGES/rails.mo +0 -0
  11. data/data/locale/de/LC_MESSAGES/rgettext.mo +0 -0
  12. data/data/locale/el/LC_MESSAGES/rails.mo +0 -0
  13. data/data/locale/el/LC_MESSAGES/rgettext.mo +0 -0
  14. data/data/locale/es/LC_MESSAGES/rails.mo +0 -0
  15. data/data/locale/es/LC_MESSAGES/rgettext.mo +0 -0
  16. data/data/locale/fr/LC_MESSAGES/rails.mo +0 -0
  17. data/data/locale/fr/LC_MESSAGES/rgettext.mo +0 -0
  18. data/data/locale/it/LC_MESSAGES/rgettext.mo +0 -0
  19. data/data/locale/ja/LC_MESSAGES/rails.mo +0 -0
  20. data/data/locale/ja/LC_MESSAGES/rgettext.mo +0 -0
  21. data/data/locale/ko/LC_MESSAGES/rails.mo +0 -0
  22. data/data/locale/ko/LC_MESSAGES/rgettext.mo +0 -0
  23. data/data/locale/nl/LC_MESSAGES/rails.mo +0 -0
  24. data/data/locale/nl/LC_MESSAGES/rgettext.mo +0 -0
  25. data/data/locale/pt_BR/LC_MESSAGES/rails.mo +0 -0
  26. data/data/locale/pt_BR/LC_MESSAGES/rgettext.mo +0 -0
  27. data/data/locale/sv/LC_MESSAGES/rgettext.mo +0 -0
  28. data/ext/gettext/extconf.rb +20 -0
  29. data/ext/gettext/{gettext/_locale.c → locale_system.c} +15 -19
  30. data/lib/gettext.rb +186 -38
  31. data/lib/gettext/cgi.rb +35 -69
  32. data/lib/gettext/container.rb +14 -5
  33. data/lib/gettext/erb.rb +30 -2
  34. data/lib/gettext/iconv.rb +19 -4
  35. data/lib/gettext/locale.rb +188 -39
  36. data/lib/gettext/locale_cgi.rb +102 -0
  37. data/lib/gettext/locale_object.rb +131 -0
  38. data/lib/gettext/locale_posix.rb +50 -0
  39. data/lib/gettext/locale_table_win32.rb +224 -182
  40. data/lib/gettext/locale_win32.rb +59 -35
  41. data/lib/gettext/mo.rb +2 -2
  42. data/lib/gettext/parser/activerecord.rb +19 -5
  43. data/lib/gettext/parser/erb.rb +6 -3
  44. data/lib/gettext/parser/glade.rb +5 -5
  45. data/lib/gettext/parser/ruby.rb +6 -6
  46. data/lib/gettext/poparser.rb +7 -6
  47. data/lib/gettext/rails.rb +122 -44
  48. data/lib/gettext/rgettext.rb +21 -8
  49. data/lib/gettext/rmsgfmt.rb +16 -8
  50. data/lib/gettext/rmsgmerge.rb +172 -50
  51. data/lib/gettext/string.rb +25 -3
  52. data/lib/gettext/textdomain.rb +89 -90
  53. data/lib/gettext/utils.rb +63 -3
  54. data/lib/gettext/version.rb +2 -2
  55. data/pkg/ruby-gettext-package-1.2.0/ext/gettext/extconf.rb +20 -0
  56. data/po/cs/rails.po +28 -28
  57. data/po/cs/rgettext.po +14 -14
  58. data/po/de/rails.po +29 -26
  59. data/po/de/rgettext.po +24 -17
  60. data/po/el/rails.po +26 -26
  61. data/po/el/rgettext.po +18 -15
  62. data/po/es/rails.po +26 -26
  63. data/po/es/rgettext.po +16 -16
  64. data/po/fr/rails.po +27 -27
  65. data/po/fr/rgettext.po +14 -14
  66. data/po/it/rgettext.po +14 -14
  67. data/po/ja/rails.po +24 -24
  68. data/po/ja/rgettext.po +14 -14
  69. data/po/ko/rails.po +24 -24
  70. data/po/ko/rgettext.po +17 -18
  71. data/po/nl/rails.po +27 -27
  72. data/po/nl/rgettext.po +18 -18
  73. data/po/pt_BR/rails.po +26 -26
  74. data/po/pt_BR/rgettext.po +14 -14
  75. data/po/rails.pot +26 -26
  76. data/po/rgettext.pot +14 -14
  77. data/po/sv/rgettext.po +14 -14
  78. data/post-setup.rb +8 -3
  79. data/pre-setup.rb +14 -1
  80. data/samples/cgi/http.rb +2 -1
  81. data/samples/makemo.rb +1 -1
  82. data/samples/rails/app/models/article.rb +15 -1
  83. data/samples/rails/locale/cs/LC_MESSAGES/blog.mo +0 -0
  84. data/samples/rails/locale/cs/LC_MESSAGES/gettext_plugin.mo +0 -0
  85. data/samples/rails/locale/de/LC_MESSAGES/blog.mo +0 -0
  86. data/samples/rails/locale/de/LC_MESSAGES/gettext_plugin.mo +0 -0
  87. data/samples/rails/locale/el/LC_MESSAGES/blog.mo +0 -0
  88. data/samples/rails/locale/el/LC_MESSAGES/gettext_plugin.mo +0 -0
  89. data/samples/rails/locale/en/LC_MESSAGES/blog.mo +0 -0
  90. data/samples/rails/locale/es/LC_MESSAGES/blog.mo +0 -0
  91. data/samples/rails/locale/es/LC_MESSAGES/gettext_plugin.mo +0 -0
  92. data/samples/rails/locale/fr/LC_MESSAGES/blog.mo +0 -0
  93. data/samples/rails/locale/fr/LC_MESSAGES/gettext_plugin.mo +0 -0
  94. data/samples/rails/locale/ja/LC_MESSAGES/blog.mo +0 -0
  95. data/samples/rails/locale/ja/LC_MESSAGES/gettext_plugin.mo +0 -0
  96. data/samples/rails/locale/ko/LC_MESSAGES/blog.mo +0 -0
  97. data/samples/rails/locale/ko/LC_MESSAGES/gettext_plugin.mo +0 -0
  98. data/samples/rails/locale/nl/LC_MESSAGES/blog.mo +0 -0
  99. data/samples/rails/locale/nl/LC_MESSAGES/gettext_plugin.mo +0 -0
  100. data/samples/rails/locale/pt_BR/LC_MESSAGES/blog.mo +0 -0
  101. data/samples/rails/locale/pt_BR/LC_MESSAGES/gettext_plugin.mo +0 -0
  102. data/samples/rails/po/blog.pot +1 -1
  103. data/samples/rails/po/cs/blog.po +1 -2
  104. data/samples/rails/po/cs/gettext_plugin.po +1 -1
  105. data/samples/rails/po/de/blog.po +1 -2
  106. data/samples/rails/po/de/gettext_plugin.po +1 -1
  107. data/samples/rails/po/el/blog.po +1 -1
  108. data/samples/rails/po/el/gettext_plugin.po +1 -1
  109. data/samples/rails/po/en/blog.po +1 -1
  110. data/samples/rails/po/es/blog.po +1 -2
  111. data/samples/rails/po/es/gettext_plugin.po +1 -1
  112. data/samples/rails/po/fr/blog.po +1 -1
  113. data/samples/rails/po/fr/gettext_plugin.po +1 -1
  114. data/samples/rails/po/gettext_plugin.pot +1 -1
  115. data/samples/rails/po/ja/blog.po +2 -1
  116. data/samples/rails/po/ja/gettext_plugin.po +1 -1
  117. data/samples/rails/po/ko/blog.po +1 -2
  118. data/samples/rails/po/ko/gettext_plugin.po +1 -1
  119. data/samples/rails/po/nl/blog.po +1 -3
  120. data/samples/rails/po/nl/gettext_plugin.po +1 -1
  121. data/samples/rails/po/pt_BR/blog.po +1 -1
  122. data/samples/rails/po/pt_BR/gettext_plugin.po +1 -1
  123. data/setup.rb +799 -574
  124. data/src/poparser.ry +6 -5
  125. data/test/gettext_runner.rb +3 -1
  126. data/test/gettext_test.rb +40 -24
  127. data/test/gettext_test_cgi.rb +60 -6
  128. data/test/gettext_test_locale.rb +136 -0
  129. data/test/gettext_test_parser.rb +12 -12
  130. data/test/locale/la/LC_MESSAGES/plural_error.mo +0 -0
  131. data/test/po/la/plural_error.po +21 -0
  132. data/test/test.bat +2 -0
  133. data/test/test.sh +2 -4
  134. data/test/{test_rubyparser_n.rb → test_rubyparser_n_.rb} +0 -0
  135. metadata +17 -12
  136. data/ext/gettext/gettext/MANIFEST +0 -3
  137. data/ext/gettext/gettext/extconf.rb +0 -20
  138. data/lib/gettext/locale_default.rb +0 -35
@@ -0,0 +1,131 @@
1
+ =begin
2
+ locale_object.rb - Locale::Object
3
+
4
+ Copyright (C) 2006 Masao Mutoh
5
+
6
+ You may redistribute it and/or modify it under the same
7
+ license terms as Ruby.
8
+
9
+ $Id: locale_object.rb,v 1.6 2006/02/20 16:12:05 mutoh Exp $
10
+ =end
11
+
12
+
13
+ module Locale # :nodoc:
14
+ class Object
15
+ attr_accessor :language, :country, :charset, :script, :sort_order, :modifier, :orig_str
16
+
17
+ # Parse POSIX or RFC 3066 style locale name to Array.
18
+ #
19
+ # * locale_name: locale name as String
20
+ #
21
+ # * Basic POSIX format: <language>_<COUNTRY>.<charset>@<modifier>
22
+ # * Basic RFC3066 format: <language>-<COUNTRY>
23
+ # * The max locale format is below:
24
+ # <language>-<COUNTRY>-<Script>_<sort order>.<charset>@<modifier>
25
+ # * both of '-' and '_' are separators.
26
+ #
27
+ # (e.g.) uz-UZ-Latn, ja_JP.eucJP, wa_BE.iso885915@euro
28
+ # * Returns: [language, country, charset, script, modifier]
29
+ # * language: a lowercase ISO 639(or 639-2/T) language code.
30
+ # * country: an uppercase ISO 3166-1 country/region identifier.
31
+ # * charset: charset(codeset) (no standard)
32
+ # * script: an initial-uppercase ISO 15924 script code.
33
+ # * sort_order: (Win32 only?)
34
+ # * modifier: (no standard)
35
+ #
36
+ # script, sort_order and modifier are not used now.
37
+ #
38
+ # "ja_JP.eucJP" => ["ja", "JP", "eucJP", nil, nil]
39
+ # "ja-jp.utf-8" => ["ja", "JP", "utf-8", nil, nil]
40
+ # "ja-jp" => ["ja", "JP", nil, nil, nil]
41
+ # "ja" => ["ja", nil, nil, nil, nil]
42
+ # "uz@Latn" => ["uz", nil, nil, nil, "Latn"]
43
+ # "uz-UZ-Latn" => ["uz", "UZ", nil, "Latn", nil]
44
+ # "wa_BE.iso885915@euro" => ["wa", "BE", "iso885915", nil, "euro"]
45
+ def self.parse(locale_name)
46
+ lang_charset, modifier = locale_name.split(/@/)
47
+ lang, charset = lang_charset.split(/\./)
48
+ language, country, script, sort_order = lang.sub(/_/, "-").split('-')
49
+ language = language ? language.downcase : nil
50
+ language = "C" if language == "c"
51
+ country = country ? country.upcase : nil
52
+ script = script ? script[0].chr.upcase + script[1..script.size].downcase : nil
53
+ [language, country, charset, script, sort_order, modifier]
54
+ end
55
+
56
+ # Initialize Locale::Object.
57
+ # * language_or_locale_name: language(ISO 639) or POSIX or RFC3066 style locale name
58
+ # * country: an uppercase ISO 3166-1 country/region identifier, or nil
59
+ # * charset: charset(codeset) (no standard), or nil
60
+ #
61
+ # Locale::Object.new("ja", "JP", "eucJP")
62
+ # -> language = "ja", country = "JP", charset = "eucJP".
63
+ # Locale::Object.new("ja", "JP")
64
+ # -> language = "ja", country = "JP", charset = nil.
65
+ # Locale::Object.new("ja_JP.eucJP")
66
+ # -> language = "ja", country = "JP", charset = "eucJP".
67
+ # Locale::Object.new("ja_JP.eucJP", nil, "UTF-8")
68
+ # -> language = "ja", country = "JP", charset = "UTF-8".
69
+ # Locale::Object.new("en-US", "CA")
70
+ # -> language = "en", country = "CA", charset = nil.
71
+ # Locale::Object.new("uz-uz-latn")
72
+ # -> language = "uz", country = "UZ", charset = nil, script = "Latn"
73
+ # Locale::Object.new("we_BE.iso885915@euro")
74
+ # -> language = "we", country = "BE", charset = "iso885915", modifier = "euroo".
75
+ def initialize(language_or_locale_name, country = nil, charset = nil)
76
+ @orig_str = language_or_locale_name
77
+ @language, @country, @charset, @script, @sort_order, @modifier =
78
+ self.class.parse(language_or_locale_name)
79
+ @country = country if country
80
+ @charset = charset if charset
81
+ end
82
+
83
+ # Returns the locale as POSIX format(but charset is ignored). (e.g.) "ja_JP"
84
+ def to_posix
85
+ ret = @language
86
+ ret += "_#{@country}" if @country
87
+ ret
88
+ end
89
+
90
+ # Returns the locale as ISO3066 format. (e.g.) "ja-JP"
91
+ def to_iso3066
92
+ ret = @language
93
+ ret += "-#{@country}" if @country
94
+ ret
95
+ end
96
+
97
+ # Returns the locale as Win32 format. (e.g.) "az_AZ-Latn"
98
+ def to_win
99
+ ret = @language
100
+ ret += "-#{@country}" if @country
101
+ ret += "-#{@script}" if @script
102
+ ret
103
+ end
104
+
105
+ # Gets the locale informations as an Array.
106
+ # * Returns [language, country, charset, script, sort_order, modifier]
107
+ # * language: a lowercase ISO 639(or 639-2/T) language code.
108
+ # * country: an uppercase ISO 3166-1 country/region identifier.
109
+ # * charset: charset(codeset) (no standard)
110
+ # * script: an initial-uppercase ISO 15924 script code.
111
+ # * sort_order: (Win32 only?)
112
+ # * modifier: (no standard)
113
+ def to_a
114
+ [@language, @country, @charset, @script, @sort_order, @modifier]
115
+ end
116
+
117
+ # Compare self and another object
118
+ # * other: another object.
119
+ # * Returns: true if the 2 objects are same object.
120
+ def ==(other)
121
+ other != nil and
122
+ @language == other.language and @country == other.country and
123
+ @charset == other.charset and @script == other.script and
124
+ @sort_order == other.sort_order and @modifier == other.modifier and
125
+ @charset == other.charset
126
+ end
127
+
128
+ alias :to_s :to_posix
129
+ alias :to_str :to_posix
130
+ end
131
+ end
@@ -0,0 +1,50 @@
1
+ =begin
2
+ locale_posix.rb
3
+
4
+ Copyright (C) 2002-2006 Masao Mutoh
5
+
6
+ You may redistribute it and/or modify it under the same
7
+ license terms as Ruby.
8
+
9
+ $Id: locale_posix.rb,v 1.1 2006/02/20 12:35:06 mutoh Exp $
10
+ =end
11
+
12
+
13
+ module Locale # :nodoc:
14
+ # Locale::SystemPosix module for Posix OS (Unix)
15
+ # This is low-level class. Application shouldn't use this directly.
16
+ module SystemPosix
17
+ extend Locale::System
18
+ module_function
19
+ # Gets the system locale using setlocale and nl_langinfo.
20
+ # * Returns the system locale (Locale::Object).
21
+ def system
22
+ old = set(Locale::System::CTYPE, nil)
23
+ locale = Locale::Object.new(set(Locale::System::CTYPE, ""), nil, codeset)
24
+ set(Locale::System::CTYPE, old)
25
+ locale
26
+ end
27
+
28
+ # Gets the charset of the locale.
29
+ # * locale: Locale::Object
30
+ # * Returns: the charset of the locale
31
+ def get_charset(locale)
32
+ old = set(Locale::System::CTYPE, nil)
33
+ set(Locale::System::CTYPE, locale.orig_str)
34
+ ret = codeset
35
+ set(Locale::System::CTYPE, old)
36
+ ret
37
+ end
38
+ end
39
+ if defined? Locale::System::CTYPE
40
+ CTYPE = Locale::System::CTYPE #:nodoc:
41
+ NUMERIC = Locale::System::NUMERIC #:nodoc:
42
+ TIME = Locale::System::TIME #:nodoc:
43
+ COLLATE = Locale::System::COLLATE #:nodoc:
44
+ MONETARY = Locale::System::MONETARY #:nodoc:
45
+ MESSAGES = Locale::System::MESSAGES #:nodoc:
46
+ ALL = Locale::System::ALL #:nodoc:
47
+ end
48
+ @@locale_system_module = SystemPosix
49
+ end
50
+
@@ -1,192 +1,234 @@
1
1
  =begin
2
2
  locale_table_win32.rb - Locale table for win32
3
3
 
4
- Copyright (C) 2002,2003 Masao Mutoh <mutoh@highway.ne.jp>
4
+ Copyright (C) 2002-2006 Masao Mutoh <mutoh@highway.ne.jp>
5
5
 
6
6
  You may redistribute it and/or modify it under the same
7
7
  license terms as Ruby.
8
8
 
9
- $Id: locale_table_win32.rb,v 1.1.1.1 2005/08/13 02:38:09 mutoh Exp $
9
+ $Id: locale_table_win32.rb,v 1.4 2006/02/20 16:07:36 mutoh Exp $
10
10
  =end
11
11
 
12
- module Locale
13
- LocaleTable = [
14
- [0x00, "C"],
15
- [0x01, "ar",
16
- [[0x01, "ar_SA"],
17
- [0x02, "ar_IQ"],
18
- [0x03, "ar_EG"],
19
- [0x04, "ar_LY"],
20
- [0x05, "ar_DZ"],
21
- [0x06, "ar_MA"],
22
- [0x07, "ar_TN"],
23
- [0x08, "ar_OM"],
24
- [0x09, "ar_YE"],
25
- [0x0a, "ar_SY"],
26
- [0x0b, "ar_JO"],
27
- [0x0c, "ar_LB"],
28
- [0x0d, "ar_KW"],
29
- [0x0e, "ar_AE"],
30
- [0x0f, "ar_BH"],
31
- [0x10, "ar_QA"]]
32
- ],
33
- [0x02, "bg_BG"],
34
- [0x03, "ca_ES"],
35
- [0x04, "zh",
36
- [[0x01, "zh_TW"],
37
- [0x02, "zh_CN"],
38
- [0x03, "zh_HK"],
39
- [0x04, "zh_SG"],
40
- [0x05, "zh_MO"]]
41
- ],
42
- [0x05, "cs_CZ"],
43
- [0x06, "da_DK"],
44
- [0x07, "de",
45
- [[0x01, "de_DE"],
46
- [0x02, "de_CH"],
47
- [0x03, "de_AT"],
48
- [0x04, "de_LU"],
49
- [0x05, "de_LI"]]
50
- ],
51
- [0x08, "el_GR"],
52
- [0x09, "en",
53
- [[0x01, "en_US"],
54
- [0x02, "en_GB"],
55
- [0x03, "en_AU"],
56
- [0x04, "en_CA"],
57
- [0x05, "en_NZ"],
58
- [0x06, "en_IE"],
59
- [0x07, "en_ZA"],
60
- [0x08, "en_JM"],
61
- [0x09, "en_GD"],
62
- [0x0a, "en_BZ"],
63
- [0x0b, "en_TT"],
64
- [0x0c, "en_PH"],
65
- [0x0d, "en_ZW"]]
66
- ],
67
- [0x0a, "es",
68
- [[0x01, "es_ES"],
69
- [0x02, "es_MX"],
70
- [0x03, "es_ES@modern"],
71
- [0x04, "es_GT"],
72
- [0x05, "es_CR"],
73
- [0x06, "es_PA"],
74
- [0x07, "es_DO"],
75
- [0x08, "es_VE"],
76
- [0x09, "es_CO"],
77
- [0x0a, "es_PE"],
78
- [0x0b, "es_AR"],
79
- [0x0c, "es_EC"],
80
- [0x0d, "es_CL"],
81
- [0x0e, "es_UY"],
82
- [0x0f, "es_PY"],
83
- [0x10, "es_BO"],
84
- [0x11, "es_SV"],
85
- [0x12, "es_HN"],
86
- [0x13, "es_NI"],
87
- [0x14, "es_PR"]]
88
- ],
89
- [0x0b, "fi_FI"],
90
- [0x0c, "fr",
91
- [[0x01, "fr_FR"],
92
- [0x02, "fr_BE"],
93
- [0x03, "fr_CA"],
94
- [0x04, "fr_CH"],
95
- [0x05, "fr_LU"],
96
- [0x06, "fr_MC"]]
97
- ],
98
- [0x0d, "he_IL"],
99
- [0x0e, "hu_HU"],
100
- [0x0f, "is_IS"],
101
- [0x10, "it",
102
- [[0x01, "it_IT"],
103
- [0x02, "it_CH"]]
104
- ],
105
- [0x11, "ja_JP"],
106
- [0x12, "ko_KR"],
107
- [0x13, "nl",
108
- [[0x01, "nl_NL"],
109
- [0x02, "nl_BE"]]
110
- ],
111
- [0x14, "no",
112
- [[0x01, "no_NO"],
113
- [0x02, "nn_NO"]]
114
- ],
115
- [0x15, "pl_PL"],
116
- [0x16, "pt",
117
- [[0x01, "pt_PT"],
118
- [0x02, "pt_BR"]]
119
- ],
120
- [0x18, "ro_RO"],
121
- [0x19, "ru"],
122
- [0x1a, "hr_HR",
123
- [[0x02, "sr_YU"],
124
- [0x03, "sr_YU@cyrillic"]]
125
- ],
126
- [0x1b, "sk_SK"],
127
- [0x1c, "sq_AL"],
128
- [0x1d, "sv",
129
- [[0x01, "sv_SE"],
130
- [0x02, "sv_FI"]]
131
- ],
132
- [0x1e, "th_TH"],
133
- [0x1f, "tr_TR"],
134
- [0x20, "ur",
135
- [[0x01, "ur_PK"],
136
- [0x02, "ur_IN"]]
137
- ],
138
- [0x21, "id_ID"],
139
- [0x22, "uk_UA"],
140
- [0x23, "be_BY"],
141
- [0x24, "sl_SI"],
142
- [0x25, "et_EE"],
143
- [0x26, "lv_LV"],
144
- [0x27, "lt_LT"],
145
- [0x29, "fa_IR"],
146
- [0x2a, "vi_VN"],
147
- [0x2b, "hy_AM"],
148
- [0x2c, "az",
149
- [[0x01, "az_AZ@cyrillic"],
150
- [0x02, "az_AZ@latin"]]
151
- ],
152
- [0x2d, "eu"],
153
- [0x2e, "wen_DE"],
154
- [0x2f, "mk_MK"],
155
- [0x36, "af_ZA"],
156
- [0x37, "ka_GE"],
157
- [0x38, "fo_FO"],
158
- [0x39, "hi_IN"],
159
- [0x3e, "ms",
160
- [[0x01, "ms_MY"],
161
- [0x02, "ms_BN"]]
162
- ],
163
- [0x3f, "kk_KZ"],
164
- [0x41, "sw"],
165
- [0x43, "uz",
166
- [[0x01, "ux_UZ@latin"],
167
- [0x02, "uz_UZ@cyrillic"]]
168
- ],
169
- [0x44, "tt"],
170
- [0x45, "bn_IN"],
171
- [0x46, "pa_IN"],
172
- [0x47, "gu_IN"],
173
- [0x48, "or_IN"],
174
- [0x49, "ta"],
175
- [0x4a, "te_IN"],
176
- [0x4b, "kn_IN"],
177
- [0x4c, "ml_IN"],
178
- [0x4d, "as_IN"],
179
- [0x4e, "mr_IN"],
180
- [0x4f, "sa_IN"],
181
- [0x57, "kok_IN"],
182
- [0x58, "mni_IN"],
183
- [0x59, "sd"],
184
- [0x60, "ks",
185
- [[0x01, "ks_PK"],
186
- [0x02, "ks_IN"]]
187
- ],
188
- [0x61, "ne",
189
- [[0x01, "ne_NP"],
190
- [0x02, "ne_IN"]]
191
- ]]
12
+ module Locale #:nodoc:
13
+ module SystemWin32 #:nodoc:
14
+ #LangID, locale name, code page
15
+ LocaleTable = [
16
+ [0x0000, "en", "CP1252"],
17
+ [0x007f, "invariant", "CP1252"],
18
+ [0x0400, "invalid", "CP1252"],
19
+ [0x0800, "system", "CP1252"],
20
+ [0x0436, "af-ZA", "CP1252"],
21
+ [0x041c, "sq-AL", "CP1252"],
22
+ [0x0484, "gsw-FR", "CP1252"],
23
+ [0x045e, "am-ET", "UNICODE"],
24
+ [0x0401, "ar-SA", "CP1256"],
25
+ [0x0801, "ar-IQ", "CP1256"],
26
+ [0x0c01, "ar-EG", "CP1256"],
27
+ [0x1001, "ar-LY", "CP1256"],
28
+ [0x1401, "ar-DZ", "CP1256"],
29
+ [0x1801, "ar-MA", "CP1256"],
30
+ [0x1c01, "ar-TN", "CP1256"],
31
+ [0x2001, "ar-OM", "CP1256"],
32
+ [0x2401, "ar-YE", "CP1256"],
33
+ [0x2801, "ar-SY", "CP1256"],
34
+ [0x2c01, "ar-JO", "CP1256"],
35
+ [0x3001, "ar-LB", "CP1256"],
36
+ [0x3401, "ar-KW", "CP1256"],
37
+ [0x3801, "ar-AE", "CP1256"],
38
+ [0x3c01, "ar-BH", "CP1256"],
39
+ [0x4001, "ar-QA", "CP1256"],
40
+ [0x042b, "hy-AM", "UNICODE"],
41
+ [0x044d, "as-IN", "UNICODE"],
42
+ [0x042c, "az-AZ-Latn", "CP1254"],
43
+ [0x082c, "az-AZ-Cyrl", "CP1251"],
44
+ [0x046d, "ba-RU", "UNICODE"],
45
+ [0x042d, "eu-ES", "CP1252"],
46
+ [0x0423, "be-BY", "CP1251"],
47
+ [0x0445, "bn-IN", "UNICODE"],
48
+ [0x201a, "bs-BA-Cyrl", "CP1251"],
49
+ [0x141a, "bs-BA-Latn", "CP1250"],
50
+ [0x047e, "br-FR", "CP1251"],
51
+ [0x0402, "bg-BG", "CP1251"],
52
+ [0x0455, "my-MM", "UNICODE"],
53
+ [0x0403, "ca-ES", "CP1252"],
54
+ [0x0004, "zh-CHS", "CP936"],
55
+ [0x0404, "zh-TW", "CP950"],
56
+ [0x0804, "zh-CN", "CP936"],
57
+ [0x0c04, "zh-HK", "CP950"],
58
+ [0x1004, "zh-SG", "CP936"],
59
+ [0x1404, "zh-MO", "CP950"],
60
+ [0x7c04, "zh-CHT", "CP950"],
61
+ [0x0483, "co-FR", "CP1252"],
62
+ [0x041a, "hr-HR", "CP1250"],
63
+ [0x101a, "hr-BA", "CP1250"],
64
+ [0x0405, "cs-CZ", "CP1250"],
65
+ [0x0406, "da-DK", "CP1252"],
66
+ [0x048c, "gbz-AF", "CP1256"],
67
+ [0x0465, "dv-MV", "UNICODE"],
68
+ [0x0413, "nl-NL", "CP1252"],
69
+ [0x0813, "nl-BE", "CP1252"],
70
+ [0x0409, "en-US", "CP1252"],
71
+ [0x0809, "en-GB", "CP1252"],
72
+ [0x0c09, "en-AU", "CP1252"],
73
+ [0x1009, "en-CA", "CP1252"],
74
+ [0x1409, "en-NZ", "CP1252"],
75
+ [0x1809, "en-IE", "CP1252"],
76
+ [0x1c09, "en-ZA", "CP1252"],
77
+ [0x2009, "en-JA", "CP1252"],
78
+ [0x2409, "en-CB", "CP1252"],
79
+ [0x2809, "en-BZ", "CP1252"],
80
+ [0x2c09, "en-TT", "CP1252"],
81
+ [0x3009, "en-ZW", "CP1252"],
82
+ [0x3409, "en-PH", "CP1252"],
83
+ [0x4009, "en-IN", "CP1252"],
84
+ [0x4409, "en-MY", "CP1252"],
85
+ [0x4809, "en-SG", "CP1252"],
86
+ [0x0425, "et-EE", "CP1257"],
87
+ [0x0438, "fo-FO", "CP1252"],
88
+ [0x464, "fil-PH", "CP1252"],
89
+ [0x040b, "fi-FI", "CP1252"],
90
+ [0x040c, "fr-FR", "CP1252"],
91
+ [0x080c, "fr-BE", "CP1252"],
92
+ [0x0c0c, "fr-CA", "CP1252"],
93
+ [0x100c, "fr-CH", "CP1252"],
94
+ [0x140c, "fr-LU", "CP1252"],
95
+ [0x180c, "fr-MC", "CP1252"],
96
+ [0x0462, "fy-NL", "CP1252"],
97
+ [0x0456, "gl-ES", "CP1252"],
98
+ [0x0437, "ka-GE", "UNICODE"],
99
+ [0x0407, "de-DE", "CP1252"],
100
+ [0x0807, "de-CH", "CP1252"],
101
+ [0x0c07, "de-AT", "CP1252"],
102
+ [0x1007, "de-LU", "CP1252"],
103
+ [0x1407, "de-LI", "CP1252"],
104
+ [0x0408, "el-GR", "CP1253"],
105
+ [0x046f, "kl-GL", "CP1252"],
106
+ [0x0447, "gu-IN", "UNICODE"],
107
+ [0x0468, "ha-NG-Latn", "CP1252"],
108
+ [0x040d, "he-IL", "CP1255"],
109
+ [0x0439, "hi-IN", "UNICODE"],
110
+ [0x040e, "hu-HU", "CP1250"],
111
+ [0x040f, "is-IS", "CP1252"],
112
+ [0x0421, "id-ID", "CP1252"],
113
+ [0x045d, "iu-CA-Cans", "UNICODE"],
114
+ [0x085d, "iu-CA-Latn", "CP1252"],
115
+ [0x083c, "ga-IE", "CP1252"],
116
+ [0x0434, "xh-ZA", "CP1252"],
117
+ [0x0435, "zu-ZA", "CP1252"],
118
+ [0x0410, "it-IT", "CP1252"],
119
+ [0x0810, "it-CH", "CP1252"],
120
+ [0x0411, "ja-JP", "CP932"],
121
+ [0x044b, "kn-IN", "UNICODE"],
122
+ [0x043f, "kk-KZ", "CP1251"],
123
+ [0x0453, "kh-KH", "UNICODE"],
124
+ [0x0486, "qut-GT", "CP1252"],
125
+ [0x0487, "rw-RW", "CP1252"],
126
+ [0x0457, "kok-IN", "UNICODE"],
127
+ [0x0412, "ko-KR", "CP949"],
128
+ [0x0812, "ko-KR@win95", "CP949"],
129
+ [0x0440, "ky-KG", "CP1251"],
130
+ [0x0454, "lo-LA", "UNICODE"],
131
+ [0x0426, "lv-LV", "CP1257"],
132
+ [0x0427, "lt-LT", "CP1257"],
133
+ [0x0827, "lt-LT@win98", "CP1257"],
134
+ [0x082e, "wee-DE", "CP1252"],
135
+ [0x046e, "lb-LU", "CP1252"],
136
+ [0x042f, "mk-MK", "CP1251"],
137
+ [0x043e, "ms-MY", "CP1252"],
138
+ [0x083e, "ms-BN", "CP1252"],
139
+ [0x044c, "ml-IN", "UNICODE"],
140
+ [0x043a, "mt-MT", "CP1252"],
141
+ [0x0481, "mi-NZ", "CP1252"],
142
+ [0x047a, "arn-CL", "CP1252"],
143
+ [0x044e, "mr-IN", "UNICODE"],
144
+ [0x047c, "moh-CA", "CP1252"],
145
+ [0x0450, "mn-MN", "CP1251"],
146
+ [0x0850, "mn-CN", "UNICODE"],
147
+ [0x0461, "ne-NP", "UNICODE"],
148
+ [0x0414, "nb-NO", "CP1252"],
149
+ [0x0814, "nn-NO", "CP1252"],
150
+ [0x0482, "oc-FR", "CP1252"],
151
+ [0x0448, "or-IN", "UNICODE"],
152
+ [0x0463, "ps-AF", "UNICODE"],
153
+ [0x0429, "fa-IR", "CP1256"],
154
+ [0x0415, "pl-PL", "CP1250"],
155
+ [0x0416, "pt-BR", "CP1252"],
156
+ [0x0816, "pt-PT", "CP1252"],
157
+ [0x0446, "pa-IN", "UNICODE"],
158
+ [0x046b, "quz-BO", "CP1252"],
159
+ [0x086b, "quz-EC", "CP1252"],
160
+ [0x0c6b, "quz-PE", "CP1252"],
161
+ [0x0418, "ro-RO", "CP1250"],
162
+ [0x0417, "rm-CH", "CP1252"],
163
+ [0x0419, "ru-RU", "CP1251"],
164
+ [0x243b, "smn-FI", "CP1252"],
165
+ [0x103b, "smj-NO", "CP1252"],
166
+ [0x143b, "smj-SE", "CP1252"],
167
+ [0x043b, "se-NO", "CP1252"],
168
+ [0x083b, "se-SE", "CP1252"],
169
+ [0x0c3b, "se-FI", "CP1252"],
170
+ [0x203b, "sms-FI", "CP1252"],
171
+ [0x183b, "sma-NO", "CP1252"],
172
+ [0x1c3b, "sma-SE", "CP1252"],
173
+ [0x044f, "sa-IN", "UNICODE"],
174
+ [0x0c1a, "sr-SP-Cyrl", "CP1251"],
175
+ [0x1c1a, "sr-BA-Cyrl", "CP1251"],
176
+ [0x081a, "sr-SP-Latn", "CP1250"],
177
+ [0x181a, "sr-BA-Latn", "CP1250"],
178
+ [0x046c, "ns-ZA", "CP1252"],
179
+ [0x0432, "tn-ZA", "CP1252"],
180
+ [0x045b, "si-LK", "UNICODE"],
181
+ [0x041b, "sk-SK", "CP1250"],
182
+ [0x0424, "sl-SI", "CP1250"],
183
+ [0x040a, "es-ES-ts", "CP1252"],
184
+ [0x080a, "es-MX", "CP1252"],
185
+ [0x0c0a, "es-ES", "CP1252"],
186
+ [0x100a, "es-GT", "CP1252"],
187
+ [0x140a, "es-CR", "CP1252"],
188
+ [0x180a, "es-PA", "CP1252"],
189
+ [0x1c0a, "es-DO", "CP1252"],
190
+ [0x200a, "es-VE", "CP1252"],
191
+ [0x240a, "es-CO", "CP1252"],
192
+ [0x280a, "es-PE", "CP1252"],
193
+ [0x2c0a, "es-AR", "CP1252"],
194
+ [0x300a, "es-EC", "CP1252"],
195
+ [0x340a, "es-CL", "CP1252"],
196
+ [0x380a, "es-UY", "CP1252"],
197
+ [0x3c0a, "es-PY", "CP1252"],
198
+ [0x400a, "es-BO", "CP1252"],
199
+ [0x440a, "es-SV", "CP1252"],
200
+ [0x480a, "es-HN", "CP1252"],
201
+ [0x4c0a, "es-NI", "CP1252"],
202
+ [0x500a, "es-PR", "CP1252"],
203
+ [0x540a, "es-US", "CP1252"],
204
+ [0x0430, "sutu", "UNICODE"],
205
+ [0x0441, "sw-KE", "CP1252"],
206
+ [0x041d, "sv-SE", "CP1252"],
207
+ [0x081d, "sv-FI", "CP1252"],
208
+ [0x045a, "syr-SY", "UNICODE"],
209
+ [0x0428, "tg-TJ-Cyrl", "CP1251"],
210
+ [0x085f, "ber-DZ", "CP1252"],
211
+ [0x0449, "ta-IN", "UNICODE"],
212
+ [0x0444, "tt-RU", "CP1251"],
213
+ [0x044a, "te-IN", "UNICODE"],
214
+ [0x041e, "th-TH", "CP874"],
215
+ [0x0451, "bo-CN", "UNICODE"],
216
+ [0x0851, "bo-BT", "UNICODE"],
217
+ [0x041f, "tr-TR", "CP1254"],
218
+ [0x0442, "tk-TM", "CP1251"],
219
+ [0x0480, "ug-CN", "CP1256"],
220
+ [0x0422, "uk-UA", "CP1251"],
221
+ [0x042e, "wen-DE", "CP1252"],
222
+ [0x0420, "ur-PK", "CP1256"],
223
+ [0x0820, "tr-IN", "CP1256"],
224
+ [0x0443, "uz-UZ-Latn", "CP1254"],
225
+ [0x0843, "uz-UZ-Cyrl", "CP1251"],
226
+ [0x042a, "vi-VN", "CP1252"],
227
+ [0x0452, "cy-GB", "CP1252"],
228
+ [0x0488, "wo-SN", "CP1252"],
229
+ [0x0485, "sah-RU", "CP1251"],
230
+ [0x0478, "ii-CN", "UNICODE"],
231
+ [0x046a, "yo-NG", "UNICODE"],
232
+ ]
233
+ end
192
234
  end