Resource bundles exist to enable an app to run in multiple languages without the need to change any code. To demonstrate this feature, letβs create a German version of the app β in fact, all we need to do is create a German version of the resource bundle file. In our code, we activate the German locale for the ResourceModel.

You can view this step live: π Live Preview of Step 7.
You can download the solution for this step here: π₯ Download step 7 (TS)π₯ Download step 7 (JS).
webapp/
βββ i18n/
β βββ i18n.properties
β βββ i18n_de.properties
βββ model/
β βββ data.json
βββ view/
β βββ App.view.xml
βββ Component.ts/.js
βββ index.html
βββ manifest.json
In the i18n folder, duplicate the i18n.properties file and rename its copy to i18n_de.properties. Replace the English text with the German text provided below. The suffix de represents the locale for the German language. Since the de locale is already set in the supportedLocales configuration of the manifest.json, it will be taken into account.
# App Descriptor
appTitle=Data Binding Tutorial
appDescription=Eine einfache Anwendung zur Erkl\u00e4rung der UI5 Data Binding Funktionen
# Field labels
firstName=Vorname
lastName=Nachname
enabled=Aktiviert
# Screen titles
panelHeaderText=Data Binding Grundlagen
To check the result, append the sap-language=DE URL parameter to the URL in your browser, for example http://localhost:port/index.html?sap-language=DE. Once you remove this parameter, your app reverts to your browserβs default language.
Next: Step 8: Binding Paths: Accessing Properties in Hierarchically Structured Models
Previous: Step 6: Resource Models
Related Information
Localization </content>