Merge commit 'e90d36500692a62b6812fe701ffa9366664e311d' into ja

This commit is contained in:
Shin Kojima
2015-03-22 11:42:25 +09:00
3 changed files with 4 additions and 4 deletions

View File

@@ -21,4 +21,4 @@ In the first section, we'll describe how to detect and set the correct locale in
- [Directory](preface.md)
- Previous Chapter: [Chapter 9 Summary](09.7.md)
- Next section: [Time zone](10.1.md)
- Next section: [Setting the default region](10.1.md)

View File

@@ -1,8 +1,8 @@
# 10.1 Time zones
# 10.1 Setting the default region
## Finding out the locale
A locale is a set of descriptors for a particular geographical region, and can include specific language habits, text formatting, cultural idioms and a multitude of other settings. A locale's name is usually composed of three parts. First (and mandatory) is the locale's language abbreviation, such as "en" for English or "zh" for Chinese. The second part is an optional country specifier, and follows the first with an underscore. This specifier allows web applications to distinguish between different countries which speak the same language, such as "en_US" for U.S. English, and "en_UK" for British English. The last part is another optional specifier, and is added to the locale with a period. It specifies which character set to use, for instance "zh_CN.gb2312" specifies the gb2312 character set for Chinese.
A locale is a set of descriptors for a particular geographical region, and can include specific language habits, text formatting, cultural idioms and a multitude of other settings. A locale's name is usually composed of three parts. First (and mandatory) is the locale's language abbreviation, such as "en" for English or "zh" for Chinese. The second part is an optional country specifier, and follows the first with an underscore. This specifier allows web applications to distinguish between different countries which speak the same language, such as "en_US" for U.S. English, and "en_GB" for British English. The last part is another optional specifier, and is added to the locale with a period. It specifies which character set to use, for instance "zh_CN.gb2312" specifies the gb2312 character set for Chinese.
Go defaults to the "UTF-8" encoding set, so i18n in Go applications do not need to consider the last parameter. Thus, in our examples, we'll only use the first two parts of locale descriptions as our standard i18n locale names.

View File

@@ -136,5 +136,5 @@ This section described how to use and store local resources. We learned that we
## Links
- [Directory](preface.md)
- Previous section: [Time zone](10.1.md)
- Previous section: [Setting the default region](10.1.md)
- Next section: [[International sites](10.3.md)