cancel
Showing results for 
Search instead for 
Did you mean: 

i18n_de.properties in UI5 Application

former_member185241
Active Participant
0 Kudos
1,093

Hello expert,

When we create any application from template then by default it create i18n.properties file and a resource model named i18n in Manifest.json. we use this model in our application.

Now i have created i18n_de.properties file with German text and wants to use in the application when logon language in DE.

how can i make same resource model i18n to work for German language also ?

Thanks,

Abhishek

Accepted Solutions (0)

Answers (2)

Answers (2)

Ryan-Crosby
Active Contributor
0 Kudos

Hi Abhishek,

The language file that will be selected for the i18n would be based on the locale data that comes from the browser.  If the browser detects the user's language is German then it the UI5 libraries will pick the appropriate i18n file so that the proper translated texts can be displayed when the application is executed.

Regards,

Ryan Crosby

former_member185241
Active Participant
0 Kudos

Hi Ryan,

So you mean to say no need of any coding required for the model.

For default i18n file :

We have model in manifest.json file

"models": {

  "i18n": {

  "type": "sap.ui.model.resource.ResourceModel",

  "settings": {

  "bundleName": "Learning.i18n.i18n"

                 }

  }

here bundle name refers to i18n.proprieties.

So i have to just create i18n_de.properties and i can use same i18n as model to get the german text ?

Thanks,

Abhishek

Ryan-Crosby
Active Contributor
0 Kudos

Hi Abhishek,

Yes, that is correct.  The only thing you need to do with that file is build it with the matching keys and include the proper translations based on the source language.

Regards,

Ryan Crosby

ugurkaya
Active Participant
0 Kudos

Hello Abhishek,

Please have a look at the following content:

Step 4: Internationalization - UI Development Toolkit for HTML5 (SAPUI5) - SAP Library

Regards

Ugur