当前位置: 首页 > news >正文

学校的网站怎么做当阳seo外包

学校的网站怎么做,当阳seo外包,大型门户网站建设方案,wordpress 栏目列表在这个章节,我们会将一些文本常量独立出一个资源文件 这样的话,可以方便这些文本常量被翻译成任意的语言 这种国际化的操作,我们一般命名为i18n 新建一个文件i18n.properties webapp/i18n/i18n.properties (New) showHelloButtonTextSay …

在这个章节,我们会将一些文本常量独立出一个资源文件

这样的话,可以方便这些文本常量被翻译成任意的语言

这种国际化的操作,我们一般命名为i18n

新建一个文件i18n.properties

webapp/i18n/i18n.properties (New)

showHelloButtonText=Say Hello
helloMsg=Hello {0}

接着我们将这些常量,绑定到Controller.js

controller/App.controller.js

sap.ui.define(["sap/ui/core/mvc/Controller","sap/m/MessageToast","sap/ui/model/json/JSONModel","sap/ui/model/resource/ResourceModel"
], (Controller, MessageToast, JSONModel, ResourceModel) => {"use strict";return Controller.extend("ui5.walkthrough.controller.App", {onInit() {// set data model on viewconst oData = {recipient : {name : "World"}};const oModel = new JSONModel(oData);this.getView().setModel(oModel);// set i18n model on viewconst i18nModel = new ResourceModel({bundleName: "ui5.walkthrough.i18n.i18n"});this.getView().setModel(i18nModel, "i18n");},onShowHello() {// read msg from i18n modelconst oBundle = this.getView().getModel("i18n").getResourceBundle();const sRecipient = this.getView().getModel().getProperty("/recipient/name");const sMsg = oBundle.getText("helloMsg", [sRecipient]);// show messageMessageToast.show(sMsg);}});
});

另外将view.xml中的常量文本替代

webapp/view/App.view.xml

<mvc:ViewcontrollerName="ui5.walkthrough.controller.App"xmlns="sap.m"xmlns:mvc="sap.ui.core.mvc"><Buttontext="{i18n>showHelloButtonText}"press=".onShowHello"/><Inputvalue="{/recipient/name}"description="Hello {/recipient/name}"valueLiveUpdate="true"width="60%"/>
</mvc:View>

Conventions

  • The resource model for internationalization is called the i18n model.

  • The default filename is i18n.properties.

  • Resource bundle keys are written in (lower) camelCase.

  • Resource bundle values can contain parameters like {0}{1}{2}, …

  • Never concatenate strings that are translated, always use placeholders.

  • Use Unicode escape sequences for special characters.

http://www.shuangfujiaoyu.com/news/49725.html

相关文章:

  • 男女之间做那个事情很污的网站深圳百度推广seo公司
  • 福州定制网站开发营销推广平台
  • 可以上传图片的网站怎么做最佳磁力搜索引擎
  • 写出网站版面布局设计步骤网络技术培训
  • 城乡建设网站证件查询自助建站免费建站平台
  • 中国石化工程建设公司网站流量购买网站
  • 雅虎网站优化怎么做平台外宣推广技巧
  • 教人做美食的网站百度网盘搜索引擎
  • 云南 网站模版徐州网站设计
  • 只做一页的网站多少钱网络优化app
  • 南京市企业展厅设计公司飞猪关键词排名优化
  • wordpress恶意验证码武威网站seo
  • 怎么做网站赚钱吗最有效的推广学校的方式
  • 嘉兴做网站优化价格全国各城市感染高峰进度查询
  • 网站设置默认主页seo百科大全
  • 小型手机网站建设多少钱拼多多标题关键词优化方法
  • 北京网站制作飞沐b2b电子商务平台有哪些
  • 河源哪有做网站什么软件可以免费引流
  • 珠海企业网站建设公司推广宣传文案
  • 企业年金有什么好处路由器优化大师
  • 做草坪绿化网站软文广告图片
  • 成都专业做网站公司哪家好怎么样推广自己的网站
  • 做理财网站需要办理icp证吗百度免费安装下载
  • 云南网站建设专家软文营销策划方案
  • flash网站推荐seo推广教程
  • wordpress blogger宁波企业seo服务
  • 莆田网站建设优化关键词排名工具
  • 网站内搜索功能怎么做网站标题算关键词优化吗
  • 遵义城乡和住房建设厅网站赣州seo推广
  • 哪个网站做中高端衣服seo基础视频教程