on 02-23-2023 11:21 AM
Hello All,
In my Fiori List report application, I have added two buttons and a popover as extension. I have maintained texts for all of them in i18n file and provided an i18n_fr file for french texts.
When I test the app in french locale, the french texts from sap library gets picketd up but my custom fields, it results in 404 error for _fr texts. Now, I tried to include the bundle url in the manifest.json settings(https://ui5.sap.com/#/topic/ec753bc539d748f689e3ac814e129563) but to no avail.
Is it a bug? or is it different in fiori elements.
sharathmgangadhara
0 seconds agoThe fix for the issue was a typo error. In my project screenshot, if you notice my translation files are names 18n_fr instead of i18n_fr.
It took a SAP ticket and follow up with support team for 2 weeks to find this grave error .
Well, so a tame ending to an intresting issue. 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
sharathmgangadhara
0 seconds agoThe fix for the issue was a typo error. In my project screenshot, if you notice my translation files are names 18n_fr instead of i18n_fr.
It took a SAP ticket and follow up with support team for 2 weeks to find this grave error .
Well, so a tame ending to an intresting issue. 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sharath,
Just checking - are your i18n files complete and cover the same text elements? From your network tab screenshot, I can see that it loaded the i18n_fr.properties at least once with status 200. Therefore I am assuming that it is loading it in this example, but in other cases it falls back to the other one. The erroring 404's could then have to do with the loading of control libraries which also require i18n and this would no longer be the case in a productive scenario.
Did you try adding the below url parameter to your running app?
sap-language=fr
You should be fine without the supportedLocales in your manifest.json as long as the i18n model is defined as per the default configuration that takes place when generating your app.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Leoni,
The i18n_fr files loaded are from the List Report folder and the standard fr files from sap libraries.
Hence, the app shows the standard fields from the CDS view in french text.
The only fields that are not loading are the ones from the i18n folder. I included the en, fr, nl options but to no avail.
Hi Sharath,
We have faced the same kind of issue and it is resolved by adding the below details to the manifest and controller file
1. Add i18n reference as below in the sap.app section of the manifest
"i18n": {
"bundleName": "APPID.i18n.i18n",
"supportedLocales": ["en", "fr"],
"fallbackLocale": "en"
},
2. Define the i18n model like this in the manifest file
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleUrl": "i18n/i18n.properties",
"supportedLocales": ["en", "fr"],
"fallbackLocale": "en"
}
},
3. Add i18n reference in onInit of your listreport & object page controller file like this
var i18nModel = new sap.ui.model.resource.ResourceModel({
bundleName: "APPID.i18n.i18n" });
this.getView().setModel(i18nModel,"i18n");
Hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.