In today’s global business landscape, creating applications that support multiple languages and cultures is essential. SAP Fiori apps, built with SAPUI5 technology in SAP Business Application Studio (BAS), offer robust support for internationalization (i18n) to make apps adaptable to different languages, regions, and user preferences.
This article explains the concepts and practical steps to add internationalization to your SAP Fiori apps using SAP Business Application Studio, enabling you to deliver user-friendly, globally ready applications.
Internationalization (i18n) is the process of designing and developing an application so it can be easily localized for different languages and regions without engineering changes. It typically involves:
Resource Bundle (i18n.properties):
A properties file containing key-value pairs for all translatable texts.
Translation Files:
Language-specific resource bundles (e.g., i18n_de.properties for German).
Binding:
UI texts are bound to keys in the resource bundle via data binding.
Locale Detection:
Fiori apps detect user locale automatically or can be overridden programmatically.
i18n Folder and Resource BundleIn your SAPUI5 project:
webapp folder, create a folder named i18n.i18n.properties in the i18n folder.appTitle=My SAP Fiori Application
welcomeMessage=Welcome, {0}!
buttonSave=Save
buttonCancel=Cancel
Declare the resource bundle in the manifest.json file under the sap.ui5 section:
"sap.ui5": {
"models": {
"i18n": {
"type": "sap.ui.model.resource.ResourceModel",
"settings": {
"bundleName": "your.namespace.i18n.i18n"
}
}
}
}
Replace "your.namespace" with your app’s namespace.
In XML Views: Use binding syntax for controls with text:
<Text text="{i18n>appTitle}" />
<Button text="{i18n>buttonSave}" />
In Controllers: Access texts programmatically:
var oBundle = this.getView().getModel("i18n").getResourceBundle();
var sWelcome = oBundle.getText("welcomeMessage", [oUserName]);
Create additional files in the i18n folder with language suffixes:
i18n_de.properties for Germani18n_fr.properties for Frenchi18n_ja.properties for JapaneseTranslate the values for each key in these files.
?sap-language=de) to force a specific language.{0}, {1}, etc., in resource bundle values to insert dynamic content.Component.js if needed.Adding internationalization to SAP Fiori apps ensures your applications reach a global audience with a personalized user experience. SAP Business Application Studio provides an integrated environment to manage i18n easily—from creating resource bundles to testing multi-language support.
By following the steps above, you can build SAP Fiori apps that dynamically adapt to different languages and cultures, meeting the diverse needs of users worldwide.