Skip to Content

Language translation not working in UI5 app

Hello Experts,

I created a Worklist type UI5 app project in WebIDE within which I am using the northwind destination to display Employee data on the screen. The app is running fine.

In the i18n folder in addition to the default i18n.properties file I have added the file i18n_de.properties within which I have stored German language texts for the static labels within the app as I want to display the text within the app in German language.

After this I changed the browser language in Google Chrome from English (United States) to German, then I cleared the browser cache and ran the app in a new session. I expected to see the app labels in German language, but all the text is still visible in English language. When I observe the Network tab I can see that instead of i18n_de.properties the app loads the i18n_en.properties file and thereby all text is displayed in English,

Can someone let me know if there is anything additional that needs to be done other than changing the browser language to the target language, to test language translation in a UI5 app?

Regards,

Saurabh

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 03, 2017 at 11:13 AM

    Hi,

    please make sure, that inside the Chrome language settings your desired language is on top. You can move them by drag&drop. Chrome always take the language which is standing on the top of the list.

    Hope this helps,

    Christian

    Add comment
    10|10000 characters needed characters exceeded

    • Thanks Christian!

      This was indeed the case. Even though I changed the browser language still English was on the top of the list. When I moved German language to the top the app texts appeared in German. Thanks a lot for your inputs.

      Regards,

      Saurabh

  • Apr 03, 2017 at 04:12 PM

    If language is hard coded in bootstrap then browser language will not be considered. Check your bootstrap in 'index.html' file..

    Add comment
    10|10000 characters needed characters exceeded