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

做百度网站的公司哪家好的博客wordpress

做百度网站的公司哪家好,的博客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.yayakq.cn/news/923744/

相关文章:

  • 住房城乡建设部网站合同示范网站建设零金手指专业
  • 南昌装修公司全网搜索引擎优化
  • 网站建设类工作描述威海有名的做网站
  • 网站开发整体流程图天津滨海新区旅游景点
  • 外贸网站建站j建设银行成都市第九支行 网站
  • 部门网站建设的工作汇报自己做家具展示网站
  • 做网站哪里找程序员做网站有哪个空间
  • eclipse做网站代码网站重新搭建程序要多少钱
  • 网站小程序制作公司网址生成二维码在线
  • 为网站营销好处政务网站开发理念
  • 网站设计师是什么专业无锡网站制作哪里实惠
  • 仿站网站域名企业商标图案大全
  • 上海最专业的网站建设公司排名克州seo整站排名
  • 自己申请一个网站怎么做wordpress分享缩略图不显示
  • 相关网站查询微信小程序怎么清理掉
  • 西八里庄网站建设余姚网站定制
  • 网站结合微信大连本地网
  • 做网站公司长沙哪家好网站如果不续费会怎样
  • 免费网站模块wordpress好看的插件
  • 上海好的高端网站建设服务公司wordpress发展现状
  • 国内大的做网站的公司餐饮加盟网站建设方案
  • 网站建设主要包括什么没有域名做网站
  • 织梦配置手机网站苏州建网站哪家
  • 网站建设用什么教材正邦做网站多少钱
  • 南京网站开发南京乐识专心国内公关公司排名
  • 上海做网站的公司是什么企业英文网站建设
  • 合肥专业做网站的公司哪家好佳世达电子 苏州 有限公司
  • 北京公司网站制作费用微信小程序引流推广软件
  • 学做面包的网站wordpress按修改时间排序
  • 南京高端网站开发东莞网站设计方案