cancel
Showing results for 
Search instead for 
Did you mean: 

Translation file is not picked up on launchpad or webide(i18n for french text)

Sharathmg
Active Contributor
0 Kudos

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.

Sharathmg
Active Contributor
0 Kudos

The 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. 🙂

Accepted Solutions (1)

Accepted Solutions (1)

Sharathmg
Active Contributor
0 Kudos

sharathmgangadhara

0 seconds ago

The 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. 🙂

Answers (3)

Answers (3)

Sharathmg
Active Contributor
0 Kudos

sharathmgangadhara

0 seconds ago

The 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. 🙂

leonikussmaul
Product and Topic Expert
Product and Topic Expert
0 Kudos

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.

Sharathmg
Active Contributor
0 Kudos

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.

0 Kudos

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.

Sharathmg
Active Contributor
0 Kudos

No luck with it.

I had done the settings earlier. One issue is manifest.json of ui5 version 1.75 throws error if we do settings in sap.app section of manifest.json. Even if I ignore error and test it, I still get the same 404 error.