Watch the video to understand how language-specific UIs are implemented through a resource model.
Using Localized Texts
Resource bundle files are stored in an SAPUI5 project in the
i18n folder, which is located under the
The figure, Using Localized Texts, shows a resource bundle with base name
i18n, which consists of three files
i18n_de.properties. All three files are located in the
i18n folder of the project. The
i18n_en.properties file contains the English texts City and Country for the two keys
countryLabelText. The i18n_de.properties file, on the other hand, contains the German texts Stadt and Land for these keys.
With the help of a resource model, the application can now bind the label texts seen on the UI to the texts from the resource bundle. For this purpose, the language-independent keys are used for the binding. Details on this are discussed in the next section.
If the application now runs with
en as language code / locale, the texts to be displayed are taken from the
i18n_en.properties file. If, on the other hand,
de is used as the language code / locale, the German texts are displayed accordingly.