{"hidden":false,"children":[{"configs":{"itemId":"module"},"expanded":true,"children":[{"configs":{"layout":"absolute","itemId":"panel1","margin":"8","width":"400","title":"@str.plsEnterName","height":"192"},"expanded":true,"children":[{"configs":{"itemId":"text1","labelAlign":"right","fieldLabel":"@str.name","width":"360","x":"8","y":"16","height":"22"},"expanded":false,"children":[],"type":"text"},{"configs":{"itemId":"date1","labelAlign":"right","fieldLabel":"@str.date","width":"360","x":"8","y":"48","value":"@new Date()","height":"22"},"expanded":false,"children":[],"type":"date"},{"configs":{"itemId":"number1","labelAlign":"right","fieldLabel":"@str.num","width":"360","x":"8","y":"80","value":"15.78","height":"22"},"expanded":false,"children":[],"type":"number"},{"configs":{"itemId":"button1","width":"112","x":"256","y":"120","text":"@Str.ok","height":"22"},"expanded":false,"children":[],"type":"button","events":{"click":"Wb.info(Wb.format(str.hintName, app.text1.getValue()));"}}],"type":"panel"}],"type":"module","events":{"finalize":"app.text1.focus(false, true);","initialize":"/*\n * 国际化包括文字，日期和数字等的国际化。在WebBuilder中可在多处定义国际化资源：\n * 1、在目录wb/libs/ext/locale内定义ExtJS用到的国际化资源；\n * 2、在目录wb/libs/touch/locale内定义touch用到的国际化资源；\n * 3、在目录wb/script/locale内定义WebBuilder用到的国际化资源；\n * 4、在模块内定义国际化资源。\n * 在方法1、2、3内使用不同文件定义不同区域的资源，每个文件末尾按ISO语言和国家（区域）代码作为后缀。系统会根据客户端请求自动加载指定文件。\n * 如果文件名中只有语言代码而省略国家代码，将作为该类语言的默认语言。\n * request的属性sys.useLang为当前请求的语言种类，多语言Str.lang为WebBuilder中已经定义的语言种类。\n * WebBuilder默认提供中文英，如有需要可扩展目录wb/script/locale内的资源。\n */\n\n// 定义模块内的国际化资源，此方法同样可用于ServerScript或Java代码。\n//Wb.getLang方法根据Str.lang值获取对应语言组成的对象，因此用到的语言必须在目录wb/script/locale内已经定义。\nvar str = Wb.getLang({ //str为小写，以区别WebBuilder定义的Str\n  name: {\n    zh: '姓名', //默认中文使用的语言，使用中文的国家地区包含中国，台湾，香港，澳门，新加坡等，如果未找到指定国家的中文默认使用此中文。\n    //zh_TW:'姓名',可定义繁体中文，台湾地区适用\n    en: 'name'\n  },\n  plsEnterName: {\n    zh: '请输入你的姓名',\n    en: 'Please enter your name'\n  },\n  hintName: {\n    zh: '你的姓名为 \u201c{0}\u201d。',\n    en: 'Your name is \"{0}\".'\n  },\n  date: {\n    zh: '日期',\n    en: 'Date'\n  },\n  num: {\n    zh: '数字',\n    en: 'number'\n  }\n});\n//使用上述方法定义后在中文环境下str.name指向\u201c姓名\u201d"}}],"roles":{"demo":1},"title":"国际化","iconCls":"","inframe":false,"pageLink":""}