在VS2013中开发OpenUi5项目时,我遇到了国际化问题。该i18n.properties不能得到:i18n.properties未找到OpenUI5
“GET http://localhost:28091/i18n/i18n.properties 404(未找到)SAP-UI-core.js:126”
这里是我的项目设置:
./国际化/ i18n.properties
showHello=Hello
./internationization/Main.controller.js
onInit: function() {
var oResourceModel = new sap.ui.model.resource.ResourceModel({
bundleName : "i18n.i18n"
});
sap.ui.getCore().setModel(oResourceModel, "i18n");
},
./internationization/Main.view.xml
<core:View
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
controllerName="internationization.Main"
xmlns:html="http://www.w3.org/1999/xhtml">
<Page title="Title">
<content>
<Button text="{i18n>showHello}"/>
</content>
</Page>
</core:View>
非常感谢你为您的帮助提前。
它工作!!!!!!非常感谢你的帮助,你为我节省了很多时间! @schnoedel – angwong