Show TOC

Handling Localized Texts for Extended ApplicationsLocate this document in the navigation structure

If an application is copied, the texts stored in the SAPUI5 text repository of the original application are not copied and are, thus, not available in the copied SAPUI5 application. This also applies to applications using the extension concepts of SAPUI5.

Caution

Although it is generally possible to copy SAPUI5 applications, copying and editing of applications in the SAPUI5 text repository must be avoided and we strongly recommend to only use the extension concepts.

To reuse translated texts in the new application, instantiate a resource model with the URL to the corresponding text properties files of the original application. If needed, you can enhance this resource model with its own properties file. For applications located in the ABAP backend, the resource model of another application located in another SAPUI5 respository in the ABAP backend can be accessed by its relative path.

The following example is valid for an application that is stored in the SAPUI5 repository in the ABAP backend:

var oModel = new sap.ui.model.resource.ResourceModel({bundleUrl:"../<original bsp application name>/i18n/i18n.properties"});

If the code is not located at the root level of the application, adjust the path with additional "../" at the beginning.

You can enhance this with an additional custom text properties file, which resides in the copied application:

oModel.enhance({bundleUrl:"./other18n.properties"});

The custom text properties file can contain additional texts or texts which overwrite the default ones from the original application.

If an SAPUI5 application is extended or copied, the GUID in the SAPUI5 translation key in the copied text properties file must be exchanged with a new one. Each text properties file must contain a unique GUID. You can then upload the application with the new translation key in the text properties file to the ABAP backend by means of the team provider or the /UI5/UI5_REPOSITORY_LOAD upload report. For the localization of the custom texts in the copied application you can the use transaction se63.