cancel
Showing results for 
Search instead for 
Did you mean: 

Fallback of Text Translation File i18n.properties not called

Former Member
0 Kudos

Hi Experts
,

I have a small SAP Fiori App with an i18n.properties file to store texts for Translation.

Problem is, the Texts are not shown. Reason is, that the Compiler searches for an i18n_DE_de.properties files but not for my i18n.properties file.

I have a similar App where the Compiler first searches also for the i18n_DE_de.properties file, but as he cannot find one, he uses my fallback i18n.properties file.

I also tried to rename my file to i18n_DE_de.properties but also my texts are not shown in this App.

Can anyone tell whats wrong?

Thanks and regards,

Sebastian

Accepted Solutions (1)

Accepted Solutions (1)

former_member312987
Active Participant
0 Kudos

Hi Sebastian

The i18n.properties file are the original texts defined in development that are used in the Fiori App.

You should find in the App, under the i18n the files for the different languages:

  • i18n.properties
  • i18n_ar.properties
  • i18n_de.properties
  • i18n_en.properties

.....

Regards

Raquel

Former Member
0 Kudos

Hi Raquel,

thanks for your reply.

I found the solution for my Problem by myself.

In Apps using  UIComponent you shoul'd NOT store Data in core. The Access won't work properly! You have to store your Data in the Component or Controller of your View.

santhu_gowdaz
Active Contributor
0 Kudos

ya for that in component.js or else in your controller you should add this code,

//Internalisation

        var oI18nModel = new sap.ui.model.resource.ResourceModel({

            bundleUrl: "i18n/i18n.properties"

        });

        sap.ui.getCore().setModel(oI18nModel, "i18n");

        this.setModel(oI18nModel, "i18n");

Former Member
0 Kudos

Hi Santhosh,

like I wrote before. I think you have to store the model in the Component.js or the Controller of the view. while using UIComponent. I don't know why.

santhu_gowdaz
Active Contributor
0 Kudos

Open your network tab and load your application. you will see the list of files loaded. If you  store the model in Component.js or the Controller of the view then it will available for that view.

Answers (2)

Answers (2)

Former Member
0 Kudos

Add this in your component.js

var oI18nModel = new sap.ui.model.resource.ResourceModel({

            bundleUrl: "i18n/i18n.properties"

        });

        sap.ui.getCore().setModel(oI18nModel, "i18n");

        this.setModel(oI18nModel, "i18n");

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Sebastian,

Please check the SAPUI5 library version.

Regards,

Masa / SAP Technology RIG