六狼论坛

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博账号登陆

只需一步,快速开始

搜索
查看: 46|回复: 0

国际化 i18n native2ascii

[复制链接]

升级  98%

13

主题

13

主题

13

主题

童生

Rank: 1

积分
49
 楼主| 发表于 2013-1-27 04:52:05 | 显示全部楼层 |阅读模式
之前在很多地方都能见到I18N,特别是open source里面。
I18N就是Internationalization的缩写,其原因是I和n之间一共有18个字母(寒~)。
下面这些地方会需要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.
当然除了I18N还有L10N(localization) 和M17N (multilingualization),这3个之间有什么区别呢,举例说明。
L10N支持2种语言,英文和另外一种语言(例如中文);
I18N支持多种语言,但是同一时间只能是英文和一种选定的语言,例如英文+中文、英文+德文、英文+韩文等等;
M17N可以在同一时间支持多种语言,例如你可以在一个页面里看到中文、英文、德文和韩文。
<div class="invisible">人们常把I18N作为“国际化”的简称,其来源是英文单词 internationalization的首末字符i和n之间的字符数为18。
随着全球经济一体化成为一种主流趋势,软件开发者应该开发出支持多国语言、国际化的Web应用。对于Web应用够说,同样的布面在不同的语言的环境下需要显示不同的效果。也就是说,一个Web应用程序在运行时能够根据客房端请求所来自的国家和语言的不同显示和不同的用户界面。这样 ,当需要在应用程序中添加对一种新的语言的支持时,不需要对已有的软件返工,无需修改应用程序的程序代码。
事实上,准备资源包的过程,就是把对应不同语言的用户所涉及的文本和图片保存在多个文本文件中,客户端根据不同的环境需要进行更换。这些文件被称为“属性文件”,所有属性文件合在一起被称为资源包(Resource Bundle)。
您需要登录后才可以回帖 登录 | 立即注册 新浪微博账号登陆

本版积分规则

快速回复 返回顶部 返回列表