/
286.txt
240 lines (176 loc) · 10.2 KB
/
286.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
* ロケール実装の構成要素
[53]
[FIG(short list)[
- [[言語]]
- [[IME]]
- [[フォント]]
- [[書字方向]]
- [[文字コード]]
- [[照合順序]]
- [[翻訳テキスト]]
- [[数値形式]]
- [[単位系]]
- [[貨幣]]
- [[価格形式]]
- [[暦法]]
- [[紀年法]]
- [[時刻系]]
- [[時間帯]]
- [[日時形式]]
- [[暦注]]
- その他[[言語]]依存処理の情報
]FIG]
* IETF における定義
[FIG(quote)[
[4]
> Locale is the user-specific location and cultural information managed by a computer.
[FIGCAPTION[
[CITE@en[RFC 3536 - Terminology Used in Internationalization in the IETF]]
<http://tools.ietf.org/html/rfc3536#section-7>
]FIGCAPTION]
]FIG]
[38] [[IETFにおけるロケール]]も参照。
* LDML における定義
[FIG[
[7]
>In this model, a locale is an identifier (id) that refers to a set of user preferences that tend to be shared across significant swaths of the world. Traditionally, the data associated with this id provides support for formatting and parsing of dates, times, numbers, and currencies; for measurement units, for sort-order (collation), plus translated names for time zones, languages, countries, and scripts. The data can also include support for text boundaries (character, word, line, and sentence), text transformations (including transliterations), and other services.
[FIGCAPTION[
[CITE@en-us[UTS #35: Unicode Locale Data Markup Language]] ([TIME[2011-07-19 03:14:51 +09:00]] 版) <http://unicode.org/reports/tr35/#Locale>
]FIGCAPTION]
]FIG]
[8] この定義による「[[ロケール]]」は文字列です。
* ロケールの仕様
[FIG(list middle)[ [13]
- [5] [[ISO/IEC 15897]] ([[IDT]] [[CEN ENV 12005]])
- [[POSIX locale]]
- [6] [[UTS #35]] [[LDML]]
]FIG]
* ロケールの分類
- [9] [[言語ロケール]]
- [10] [[領土ロケール]]
- [[疑似ロケール]]
* ロケール識別子
[61] [[ロケール識別子]]参照。
* ロケールの継承
[11] [[ロケール]]間には[[継承]]関係が定義されていることもあります。
[REFS[
- [12] [CITE@en-us[UTS #35: Unicode Locale Data Markup Language]] ([TIME[2011-07-19 03:14:51 +09:00]] 版) <http://unicode.org/reports/tr35/#Locale_Inheritance>
]REFS]
* データ
[49] [[ロケールの更新]]参照。
* セキュリティーとプライバシー
[60] [[ロケール]]の選択の情報は、[[プライバシー]]に関するものと扱う必要があります。
[34] [[日時のプライバシー]]、[[日時のセキュリティー]]、[[文字のセキュリティー]]も参照。
* 実装
[FIG(short list)[ [33] [[ロケール]]の実装
- [[ロケール (WebExtensions)]]
- [[ロケール (Facebook)]]
- [CODE[Intl]]
- [CITE[[[The locale interface]]]]
]FIG]
* メモ
[1]
<http://macchiato.com/slides/unicode_at_google.pdf>
[2] [CITE[Manpage of LOCALE]] ([TIME[2009-03-14 16:26:46 +09:00]] 版) <http://www.linux.or.jp/JM/html/LDP_man-pages/man5/locale.5.html>
[3] [CITE@en[GNU libc (glibc) locale patch page]] ([TIME[2004-07-18 17:07:47 +09:00]] 版) <http://www.hungry.com/~pere/linux/glibc/>
[14] [CITE@en[RFC 6365 - Terminology Used in Internationalization in the IETF]]
([TIME[2011-09-10 19:11:51 +09:00]] 版)
<http://tools.ietf.org/html/rfc6365#section-8>
[15] [CITE@en[Web Applications 1.0 r6905 Clarify how language affects form controls.]]
( ([TIME[2012-01-21 08:03:00 +09:00]] 版))
<http://html5.org/tools/web-apps-tracker?from=6904&to=6905>
[16] [CITE@en[Web Services Internationalization (WS-I18N)]]
( ([TIME[2012-05-17 23:07:50 +09:00]] 版))
<http://www.w3.org/TR/2012/NOTE-ws-i18n-20120522/#sec-locale>
[17] [CITE@en[Bug 22679 – API to expose locale-specific settings]]
( ([TIME[2013-10-15 08:07:23 +09:00]] 版))
<https://www.w3.org/Bugs/Public/show_bug.cgi?id=22679>
[18] [CITE@ja[ロケールとコード ページ]]
([TIME[2015-04-24 19:40:59 +09:00]] 版)
<https://msdn.microsoft.com/ja-jp/library/8w60z792.aspx>
[23] [CITE[Internationalizing Your App - Google Chrome]]
([TIME[2015-04-24 19:47:04 +09:00]] 版)
<https://developer.chrome.com/webstore/i18n?csw=1#localeTable>
[24] [CITE@en[Mozilla localizations - Wikipedia, the free encyclopedia]]
([TIME[2015-04-23 11:42:41 +09:00]] 版)
<http://en.wikipedia.org/wiki/Mozilla_localizations>
[25] [CITE@ja[カスタム用語集の形式 - Translate ヘルプ]]
([TIME[2015-04-24 20:24:00 +09:00]] 版)
<https://support.google.com/translate/toolkit/answer/147854?hl=ja>
[26] [CITE[Locale | Android Developers]]
([TIME[2015-04-24 21:39:02 +09:00]] 版)
<http://developer.android.com/reference/java/util/Locale.html>
[27] [CITE[localization - What is the list of supported languages/locales on Android? - Stack Overflow]]
([TIME[2015-04-24 21:39:12 +09:00]] 版)
<http://stackoverflow.com/questions/7973023/what-is-the-list-of-supported-languages-locales-on-android>
[28] [CITE@en-US[Android App Localization :: WilsonMar.com]]
([[Wilson Mar, 310.320-7878]] 著, [TIME[2014-08-24 10:54:11 +09:00]] 版)
<http://www.wilsonmar.com/android_localization.htm>
[29] [CITE@en[Mobile/Projects/Localization - MozillaWiki]]
([TIME[2015-04-24 21:45:04 +09:00]] 版)
<https://wiki.mozilla.org/Mobile/Projects/Localization>
[39] [CITE@ja[LibreOffice Localization Guide/Adding a New Language or Locale - The Document Foundation Wiki]]
([TIME[2015-01-25 23:26:46 +09:00]] 版)
<https://wiki.documentfoundation.org/LibreOffice_Localization_Guide/Adding_a_New_Language_or_Locale>
[40] [CITE@en[LCOV - make check - i18nlangtag/source/isolang/isolang.cxx]]
([TIME[2015-03-05 07:44:18 +09:00]] 版)
<http://lcov.libreoffice.org/i18nlangtag/source/isolang/isolang.cxx.gcov.html>
[41] [CITE@en[List of Wikipedias - Meta]]
([TIME[2015-04-25 09:00:16 +09:00]] 版)
<http://meta.wikimedia.org/wiki/List_of_Wikipedias>
[42] [CITE@en[MySQL :: MySQL 5.6 Reference Manual :: 10.7 MySQL Server Locale Support]]
([TIME[2015-04-25 15:10:18 +09:00]] 版)
<https://dev.mysql.com/doc/refman/5.6/en/locale-support.html>
[43] [CITE[Java SE 7 Supported Locales]]
([TIME[2015-04-25 17:28:54 +09:00]] 版)
<http://www.oracle.com/technetwork/java/javase/javase7locales-334809.html>
[44] [CITE@en[''''''[''''''mediawiki'''''']'''''' Contents of /trunk/phase3/languages/Names.php]]
([TIME[2015-04-25 19:49:51 +09:00]] 版)
<http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/languages/Names.php?view=markup>
[45] [CITE@en[mediawiki/Names.php at master · wikimedia/mediawiki]]
([TIME[2015-04-25 19:51:12 +09:00]] 版)
<https://github.com/wikimedia/mediawiki/blob/master/languages/Names.php>
[46] [CITE@en[Languages]]
([TIME[2015-04-25 22:25:47 +09:00]] 版)
<https://translations.launchpad.net/+languages>
[47] [CITE@ja[+1 ボタン - Google+ Platform — Google Developers]]
([TIME[2013-06-08 08:18:53 +09:00]] 版)
<https://developers.google.com/+/web/+1button/#available-languages>
[55] [CITE@en[API Reference - Web Application - Tizen Web Device API Reference - Cordova - Globalization API | Tizen Developers]]
([TIME[2017-04-13 01:18:45 +09:00]])
<https://developer.tizen.org/development/api-references/web-application?redirect=https://developer.tizen.org/dev-guide/3.0.0/org.tizen.web.apireference/html/device_api/mobile/tizen/cordova/globalization.html>
[56] [CITE@en[API Reference - Web Application - Tizen Web Device API Reference - System - Time API | Tizen Developers]]
([TIME[2017-04-13 01:21:29 +09:00]])
<https://developer.tizen.org/development/api-references/web-application?redirect=https://developer.tizen.org/dev-guide/3.0.0/org.tizen.web.apireference/html/device_api/mobile/tizen/time.html>
[35] [[ゲーム]]に[[○]]や[[×]]の[[ボタン]]があると、
[[ロケール]]によって「決定」と「取消」の割当が逆になったりします。
([[ハードウェア]]の[[ボタン]]の位置は当然そのままで、
挙動が入れ替わります。それに伴い操作説明など関係する[[文言]]の一部を変える必要が出たりもします。)
[19] [[記号]]にすると多文化対応で怒られる。
[[文字]]にすると多言語対応で怒られる。
[[色]]にすると色盲対応で怒られる。
[[矢印]]にすると[[多方向性][bidi]]対応で怒られる。
何やっても詰んどるやんけwwwww
[20] [CITE@en[Picker API Developer's Guide | Google Developers]]
([TIME[2019-10-01 11:27:14 +09:00]])
<https://developers.google.com/picker/docs/#i18n>
[21] [CITE[Tcl Improvement Proposals: TIP 156: Language-Neutral Root Locale for Msgcat]]
([TIME[2020-11-17T01:02:06.000Z]])
<https://core.tcl-lang.org/tips/doc/trunk/tip/156.md>
[22] [CITE[XFA-Template]]
([TIME[2021-04-21T03:41:53.000Z]])
<https://www.w3.org/1999/05/XFA/xfa-template.html#prose-intro-locale>
[30] [CITE@en-us[LCTYPE Constants | Microsoft Learn]], [[Archiveddocs]], [TIME[2023-06-30T08:22:54.000Z]] <https://learn.microsoft.com/en-us/previous-versions/aa912934(v=msdn.10)?redirectedfrom=MSDN>
[31] [CITE@en-us[InvisibleApp.FormatResultEx method (Visio) | Microsoft Learn]], [[o365devx]], [TIME[2023-06-30T08:23:08.000Z]] <https://learn.microsoft.com/en-us/office/vba/api/visio.invisibleapp.formatresultex>
[32] [CITE@ja['''['''解説''']'''「Windowsの設定がフランス語だとゲームが起動しない」開発者がXで公開した小数点表記に関するバグの詳細をレポート – IndieGamesJp.dev]], [TIME[2023-08-17T02:57:59.000Z]] <https://indiegamesjp.dev/?p=8047>
[36]
人間が読み書きする文字列ではない機械処理用データの処理は[[ロケール]]に依存するべきではないし、
人間が読み書きする文字列の処理は[[ロケール]]によって決まるべき、
両者は (たまたま一致することがあっても) まったく別の処理。
ところが[[プラットホーム]]の設計者がこの区別を意識していないか、
[[プラットホーム]]を使う開発者が区別を理解していないで、
両者を取り違えてしまうケースはよくみられる、例えば >>32。
[37]
>>32 もそうだけど、こうすれば解決できる、
という説明はなされても、
なぜそうすれば解決するのかが十分によく説明されていないケースが多い気がする。