on 2017 Mar 29 5:39 PM
Hi, I hope can you help me. Internationalization are only given in the controls page, but not the menu of my control sap.ui.uinified.Shell.
I'm working with manifest.json to specify the model i18n.
...
},
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "adois.ui.i18n.i18n"
}
}
}
...
This way i18n Bind
var oToolbarShell = new sap.m.OverflowToolbar("idToolbarShell", {
content : [
new sap.m.Text("idTitleShell",{
text: "{i18n>TitleShell}",
}),
new sap.m.ToolbarSpacer(),
...
in i18n.properties
TitleShell=IM TITLLE SHELL
Nota:The shell toolbar code is in controller of controlId especific in routing.
I attach an image.
seems es file is not found, just keep these two files:
and run your application in English or Spanis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what language you are using to run ui5 app? what property file you have prepared? do you have any idea about i18n(generally, not ui5's)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. Should I specify a language to run the application? I thought that the application detects the language of the browser and runs in that language, currently my browser is in the Spanish language Latin America.
2. I have the i18n.properties file and the i18n_ES.properties file
3. Sólo he leido las refencias del api y demos sobre i18n en ui5
The properties file is loaded correctly, but the internationalization does not work from the driver of my root control id.
"routing": {
"config": {
"routerClass": "sap.m.routing.Router",
"viewType": "XML",
"viewPath": "adois.ui.view",
"controlId": "appMain", <------ root control id
"controlAggregation": "pages",
"transition": "slide",
"bypassed": {
"target": "notFound"
}
},
app.view
<mvc:View
controllerName="adois.ui.controller.App"
xmlns="sap.m"
xmlns:mvc="sap.ui.core.mvc"
displayBlock="true">
<NavContainer id="appMain"></NavContainer> <------ root control id
</mvc:View>
in app.comtroller
sap.ui.define([
"adois/ui/controller/BaseController",
'sap/ui/model/Filter',
], function (BaseController, Filter) {
"use strict";
jQuery.sap.require("jquery.sap.storage");
jQuery.sap.require("sap.m.MessageBox");
return BaseController.extend("adois.ui.controller.App", {
onInit: function () {
...
var oToolbarShell = new sap.m.OverflowToolbar("idToolbarShell", {
content : [
new sap.m.Text("idTitleShell",{
text: "{i18n>TitleShell}",
}),
new sap.m.ToolbarSpacer(),
...
It is not assumed that when the properties file for a particular region like i18n_es.properties can not be found the application looks for i18n.properties. The browser is configured in Spanish that is why you ask for those files but you can not find them and when you do not find them go to the i18n. If I did not find it would not show my texts in the page controls. But there if the shows the problem is with the root control. Apparently I did not let myself be understood.
This is the code I hope I can help
User | Count |
---|---|
57 | |
11 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.