博客网 >

How to globalize Javascript
作者:分类:默认分类标签:

the principle about globalization javascript values is to use server side response. In server side code you can then get values from resource files, or you can directly use different js files to store different language's code which performs the same function.

serveral rencommendation about this are:

1. use "var win=window.open('',WindowNameWhichYouWantToLocalize)", then you can use "win.anyValuesYouDefinedInTheWindow="+valueFromLocalizeFile.tostring()+";".

2. use tag <script type="javascript/text" src="jsGlobalze.aspx"/>, in the page jsGlobalize.aspx, use responwe.write() write out javascript code directly. As it is in server side, any strings in resource file can be written out in this way.

3. use httpHandler, you can define a httpHandler to handl request of js files, request of specific js file or all js files, as it can be configured in webconfig.ini, will call the httphandler, then you can deal with it in server side code.

<< 面向公众的地图搜索原理浅析 / long days not be... >>

专题推荐

不平凡的水果世界

不平凡的水果世界

平凡的水果世界,平凡中的不平凡。 今朝看水果是水果 ,看水果还是水果 ,看水果已不是水果。这境界,谁人可比?在不平凡的水果世界里,仁者见仁,智者见智。

中国春节的那些习俗

中国春节的那些习俗

正月是农历新年的开始,人们往往将它看作是新的一年年运好坏的兆示期。所以,过年的时候“禁忌”特别多。当然,各个地方的风俗习惯不一样,过年的禁忌也是不一样的。

评论
0/200
表情 验证码:

gisman

  • 文章总数0
  • 画报总数0
  • 画报点击数0
  • 文章点击数0
个人排行
        博文分类
        日期归档