Skip to Content
0

Language translation not working in UI5 app

Apr 03, 2017 at 09:06 AM

86

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Christian Kovar Apr 03, 2017 at 11:13 AM
0

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

Show 1 Share
10 |10000 characters needed characters left 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

0
Srikanth KV Apr 03, 2017 at 04:12 PM
0

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

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Language is not hard coded anywhere in the bootstrap in the index.html file. The suggestion from Christian worked and the problem is solved.

0