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

昆明网站seo报价网络推广宣传方式

昆明网站seo报价,网络推广宣传方式,江苏做家纺的公司网站,网站url如何做优化在这个章节,我们会将一些文本常量独立出一个资源文件 这样的话,可以方便这些文本常量被翻译成任意的语言 这种国际化的操作,我们一般命名为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.dinnco.com/news/64777.html

相关文章:

  • 大连 网站制作网页制作网站
  • 做资讯网站怎么挣钱宣传网站有哪些
  • 二手书网站开发设计seo定义
  • 网站维护费用明细网站优化排名推广
  • 东营网站设计多少钱云南网络推广seo代理公司
  • 西安手机网站建设国外浏览器搜索引擎入口
  • .ai域名注册网站成都seo达人
  • 女人网上量体做衣网站百度度小店申请入口
  • 做网站的注意点关键词排名点击软件
  • 江阴做网站优化高平网站优化公司
  • 人像摄影网站有哪些企业微信会话存档
  • 那个做图网站叫什么渠道推广平台
  • 福建建设注册管理中心网站如何网站推广
  • 手机怎么做销售网站互联网营销课程体系
  • 开网店卖什么最赚钱seo高手培训
  • 设计电子商务网站方式制作网站
  • dw做的网站怎么发布到网上我是seo关键词
  • 网站备案证书放到哪里信息流推广渠道有哪些
  • 做建网站的公司国内时事新闻
  • 搜索网站老是跳出别的网站要怎么做南昌seo服务
  • 专业网站开发哪家好网站宣传文案范例
  • 日本风格网站百度一下百度网页官
  • 企业网站推广的模式域名注册1元
  • 北京移动网站建设公司电商网站
  • 阳泉哪里做网站百度app打开
  • 前几年做啥网站致富百度指数爬虫
  • 灵璧有做公司网站的吗查网站
  • 珠海企业网站建设公司seo推广
  • 徐州做网站需要多少钱排名第一的手机清理软件
  • 赣州哪里做网站枣庄网站seo