之前在很多地方都能見到I18N,特別是open source里面。I18N就是Internationalization的縮寫,其原因是I和n之間一共有18個(gè)字母。
下面這些地方會需要I18N
- Displaying characters for the users' native languages.
- Inputing characters for the users' native languages.
- Handling files written in popular encodings that are used for the users' native languages.
- Using characters from the users' native languages for file names and other items.
- Printing out characters from the users' native languages.
- Displaying messages by the program in the users' native languages.
- Formatting input and output of numbers, dates, money, etc., in a way that obeys customs of the users' native cultures.
- Classifying and sorting characters, in a way that obey customs of the users' native cultures.
- Using typesetting and hyphenation rules appropriate for the users' native languages.
當(dāng)然除了I18N還有L10N(localization) 和M17N (multilingualization),這3個(gè)之間有什么區(qū)別呢,舉例說明。
L10N支持2種語言,英文和另外一種語言(例如中文);
I18N支持多種語言,但是同一時(shí)間只能是英文和一種選定的語言,例如英文+中文、英文+德文、英文+韓文等等;
M17N可以在同一時(shí)間支持多種語言,例如你可以在一個(gè)頁面里看到中文、英文、德文和韓文。