cancel
Showing results for 
Search instead for 
Did you mean: 

i18n for the extended Fiori app

kammaje_cis
Active Contributor
0 Kudos

Hi,

I am extending My Inbox fiori app. I have a set of texts which I want to maintain in i18n file.

I created them in my extended app under i18n folder.

I see in the Network tab that my file is read by the application. But when I do return this.getModel("i18n").getProperty('<Key>'), I do not get the right value. Is there more to do?

I do not want to create a new model and set to my application, rather I think there should be some mechanism to merge my i18n with the standard one. Isn't it?

Thanks

Krishna

Accepted Solutions (1)

Accepted Solutions (1)

Former Member

Hi Krishna,

You just need to add a i18n folder in your extension project and add the internationalization files (i18n_en.properties, ...) there.

In these files you just add the additional translation (controls of your extension or overrides of the standard).

in the component.js of your extension project add

config : {

  "sap.ca.i18Nconfigs": {

       bundleName:"<your component name>.i18n.i18n"

       }

  }

(replace <your component name> with the name of your extension component specified in component.js

regards

Sven

kammaje_cis
Active Contributor
0 Kudos

Thanks Sven. Perfect. Its working.

Former Member
0 Kudos

Hi Krishna,

I had the same issue and I applied Sven's solution. It worked perfectly in my eclipse environment. The expected texts were displayed on my extended fiori app. But, after deploying to ECC, it doesn't work. So I was wondering what is the <component name> you have given.

I have extended SRM Approve Shopping cart app and below is how config looks :

Is something wrong in the way I have defined?

Any advice/solution is really appreciated.

Regards,

Prerana

Former Member
0 Kudos

Hi Prerana,

The config below worked for me:

The only thing I can suggest is that you check the browser caching (I opened a new incognito window in chrome to test). If the bundle is not found you will see a 404 in the console.

Warren

tunakaner
Participant
0 Kudos

If you want to extend for any other language, (for example: Travel Request FIN_TR_CREExtension for Turkish)

You need change config part in Component.js file like → config: { "sap.ca.i18Nconfigs": { bundleName: "travel.request.create.FIN_TR_CREExtension.i18n.i18n_tr" } },

And change the i18n file name in i18n folder like → i18n_tr.properties

Answers (0)