Overview
You will learn
- How to define a property file to store the language and locale-specific strings
- How to consume localized text strings in metadata definition
- How to use Currency and Date Time formatters
Prerequisites
Prerequisites
- Tutorial group: Set Up for the Mobile Development Kit (MDK)
- Install SAP Mobile Services Client on your Android device or iOS
![]() Android | ![]() iOS |
(If you are connecting to AliCloud accounts, you will need to brand your custom MDK client by allowing custom domains.)
Steps
Intro
You may clone an existing metadata project from the MDK Tutorial GitHub repository and start directly with step 10 in this tutorial.
Internationalization (i18n) is the process of designing and developing your software or mobile application product so it can be adapted and localized to different cultures, regions, and languages.
Localization (l10n) is the adaptation of your software or mobile application product to meet the language, culture, and other requirements of each locale. It refers to localizing time and date differences, currency, accounting standards, culturally appropriate images, symbols, and hand gestures, spelling, and other locale-specific components.
As a developer, you can now provide translations and localization for your MDK application. This allows end-users to view the mobile application in their own language and regional settings. MDK already supports various languages for end-user facing texts to be translated.
This step includes creating a mobile project in SAP Build Lobby.
In the SAP Build Lobby, click Create > Create to start the creation process.

SAP Build Lobby Create Button Click the Application tile and choose Next.

Application Tile Selection Select the Mobile category and choose Next.

Mobile Category Selection Select the Mobile Application to develop your mobile project in SAP Business Application Studio and choose Next.

Mobile Application Template Selection Enter the project name
mdk_i18n_l10n(used for this tutorial) , add a description (optional), and click Review.
Project Name And Description Entry SAP Build recommends the dev space it deems most suitable, and it will automatically create a new one for you if you don’t already have one. If you have other dev spaces of the Mobile Application type, you can select between them. If you want to create a different dev space, go to the Dev Space Manager. See Working in the Dev Space Manager.
Review the inputs under the Summary tab. If everything looks correct, click Create to proceed with creating your project.

Project Summary Review Screen Your project is being created in the Project table of the lobby. The creation of the project may take a few moments. After the project has been created successfully, click the project to open it.

Project Created In Lobby Table The project opens in SAP Business Application Studio.

Project Opened In SAP BAS When you open the SAP Business Application Studio for the first time, a consent window may appear asking for permission to track your usage. Please review and provide your consent accordingly before proceeding.

SAP BAS Usage Consent Window
The Storyboard provides a graphical view of the application’s runtime resources, external resources, UI of the application, and the connections between them. This allows for a quick understanding of the application’s structure and components.
- Runtime Resources: In the Runtime Resources section, you can see the mobile services application and mobile destination used in the project, with a dotted-line connected to the External Resources.
- External Resources: In the External Resources section, you can see the external services used in the project, with a dotted-line connection to the Runtime Resource or the UI app.
- UI Application: In the UI Applications section, you can see the mobile applications.
Click on + button in the Runtime Resources column to add a mobile services app to your project.

Runtime Resources Add Button This screen will only show up when your CF login session has expired. Use either
CredentialsORSSO Passcodeoption for authentication. After successful signed in to Cloud Foundry, select your Cloud Foundry Organization and Space where you have set up the initial configuration for your MDK app and click Apply.
CF Login Authentication Dialog Choose
myapp.mdk.demofrom the applications list in the Mobile Application Services editor.
Mobile Application Services App Selection Select
com.sap.edm.sampleservice.v4from the destinations list and click Add App to Project.
Destination Selection Add To Project You can access the mobile services admin UI by clicking on the Mobile Services option on the right hand side.
In the storyboard window, the app and mobile destination will be added under the Runtime Resources column. The mobile destination will also be added under the External Resources with a dotted-line connection to the Runtime Resource. The External Resource will be used to create the UI application.

Storyboard With Runtime Resources Added Click the + button in the UI application column header to add mobile UI for your project.

UI Application Column Add Button In the Basic Information step, select the MDK Template Type as List Detail, leave the other options as they are. Since the option to Enable Auto-Deployment to Mobile Services After Project Creation is set to Yes, the MDK project will automatically be deployed to the Mobile Services after it is generated. Click Next to continue.

MDK Template Type List Detail Selection The
List Detailtemplate generates the offline or online actions, rules, messages and pages to view records. More details on MDK template is available in help documentation.In the Data Collections step, provide the below information and click Finish. Data Collections step retrieves the entity sets information for the selected destination.
Field Value Enter a path to service (e.g. /sap/opu/odata/sap/SERVICE_NAME)Leave it as it is Select the Service TypeLeave the default value as ODataEnable OfflineIt’s enabled by default Select all data collectionsLeave it as it is What types of data will your application contain?Select Customers(if not selected by default) and selectSalesOrderHeaders
Data Collections Step Configuration Regardless of whether you are creating an online or offline application, this step is needed for app to connect to an OData service. When building an MDK Mobile application, it assumes the OData service created and the destination that points to this service is set up in Mobile Services.
Since you have Enable Offline set to Yes, the generated application will be offline enabled in the MDK Mobile client.
Data Collections step retrieves the entity sets information for the selected destination.
After clicking Finish, the storyboard is updated displaying the UI component. The MDK project is generated in the project explorer and automatically deployed to the Mobile Services based on your selections. You will now see a QR code for onboarding the mobile app. Leave the Onboarding dialog box open for the next step.

QR Code Onboarding Dialog 
Storyboard Updated With UI Component
Ensure that you choose the correct device platform tab above. Once you have scanned and onboarded using the onboarding URL, it will be remembered. If you log out and onboard again, you will be prompted to either continue using the current application or scan a new QR code.
Follow these steps to successfully on-board the MDK client on your Android device.
After you accept app update, you will see the
Mainpage andCustomersandSalesOrderHeadersentity sets to navigate to List-Detail page.
Android Main Page With Entity Sets com_sap_edm_sampleservice_v4is the name of the service file generated in the project creation.In the next steps, you will learn how to translate the UI texts on this screen, including phrases such as
Main,Customers, andSalesOrderHeaders, as well as items in the user menu likeSync ChangesandCheck for Updates, andResetinto their respective localized strings in the German language.Tap
SalesOrderHeadersto navigate to Sales order List. There are two control properties displaying Date and Gross Amount values generated by the template. You will also learn how you can format these values to be displayed based on the device’s current locale.
Android Sales Order Headers List Page
Ensure that you choose the correct device platform tab above. Once you have scanned and onboarded using the onboarding URL, it will be remembered. If you log out and onboard again, you will be prompted to either continue using the current application or scan a new QR code.
Follow these steps to successfully on-board the MDK client on your iOS device.
After you accept app update, you will see the
Mainpage andCustomersandSalesOrderHeadersentity sets to navigate to List-Detail page.
iOS Main Page With Entity Sets com_sap_edm_sampleservice_v4is the name of the service file generated in the project creation.In the next steps, you will learn how to translate the UI texts on this screen, including phrases such as
Main,Customers, andSalesOrderHeaders, as well as items in the user menu likeSync ChangesandCheck for Updates, andResetinto their respective localized strings in the German language.Tap
SalesOrderHeadersto navigate to Sales Order List. There are two control properties displaying Date and Gross Amount values generated by the template. You will also learn how you can format these values to be displayed based on the device’s current locale.
iOS Sales Order Headers List Page
The i18n.properties file is where language & locale specific strings are stored.
The file name structure can consist of up to 4 parts:
<base_filename>_<language_code>_<script_code>_<region_specifier>.properties
for example: myi18n_zh_Hant_HK.properties = properties file for Chinese language with Traditional script specifier and Hong Kong region specifier.
For this tutorial, you will create the i18n_de.properties file for the German language.
Navigate to
MDK_i18n_l10n|i18n, right click on thei18n.propertiesand open it with Text Editor. Replace the existing content with below.JSONMain_title=Main Customers=Customers Customer_Detail=Customer Detail SalesOrderHeaders=SalesOrderHeaders SalesOrderHeader_Detail=SalesOrderHeader Detail SalesOrderItem_Detail=SalesOrderItem Detail Support_popovermenuitem=Support About_popovermenuitem=About
i18n Properties File Content Updated Each property file contains a list of localization strings that come in key value pair syntax.
<Localization_Key>=<Localized_Value>Right-click the
i18nfolder and select MDK: New i18n File.
i18n Folder New i18n File Menu Enter the file Name as
i18n_de, click Finish.
New i18n File Name Entry Dialog The
i18n_de.propertiesopens in thei18n Editor. Provide the following values for the existing keys underi18n_decolumn.Key Value Main_titleHauptCustomersKundenCustomer_DetailKundendetailSalesOrderHeadersVerkaufsauftragsübersichtSalesOrderHeader_DetailVerkaufsauftragskopfdatenSalesOrderItem_DetailVerkaufspositionsdetailsSupport_popovermenuitemUnterstützungAbout_popovermenuitemÜber
i18n Editor German Translations Entry
MDK applications support various localization formatter functions:
L: Localizable String
N: Number
C: Currency
S: Scientific
P: Percentage
DT: Date Time
D: Date
T: Time
You will use the Localizable String function to add language support on the Main page of your application.
Click
Main.pageto open it in the MDK Page Editor.Once the page opens in the page editor, click on the white area to select it’s Action Bar. In the Properties pane, click the link icon for the Page caption, select i18n Objects in the dropdown and double click on
main_title:"Main"to bind Caption to the Localizable String.
Page Caption Bound To Localizable String Similarly, update the Title for both
CustomersandSalesOrderHeadersSection buttons.
Customers Section Button Title Updated 
SalesOrderHeaders Section Button Title Updated Navigate to Actions → Application →
UserMenuPopover.actionand update the Title for bothSupportandAboutPopover items to$(L,'support_popovermenuitem')and$(L,'about_popovermenuitem')respectively.
UserMenuPopover Action Titles Updated
You can find more information about Localized String formatter in help documentation.
You will add Currency formatter in the SalesOrderHeaders_List.page.
Syntax: $(C, <Value>, <Currency Code>, <Locale>, <Format Options>)
Navigate to Pages →
com_sap_edm_sampleservice_v4_SalesOrderHeaders→SalesOrderHeaders_List.page.You’ll update the Object Table control’s
StatusTextproperty which is currently bound to the OData property{GrossAmount}. You will format the property value using theCurrencyformatter.In the Properties pane, click the link icon for the
StatusTextproperty.Cut or remove the default expression in the object browser.
Select i18n Objects in the dropdown and then select Currency in the formatters dropdown.
Click Insert to generate the expression, do not close the Object Browser window.

Currency Formatter Expression Generated The generated expression looks like below:
JSON$(C,,'',{minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:2,useGrouping:true})You will now bind the Currency value placeholder with the
GrossAmountproperty of theSalesOrderHeadersentity. Put the cursor before the second comma (from left side).Choose OData Objects option from the dropdown, select the
GrossAmountproperty under theSalesOrderHeader. Click Insert to generate the expression, do not close the Object Browser window.
GrossAmount Property Bound To Currency The new expression looks like below:
JSON$(C,{GrossAmount},'',{minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:2,useGrouping:true})You will now bind the Currency Code placeholder. Since there is already an OData property
CurrencyCodepart ofSalesOrderHeadersentity, it would be best to use the value coming directly from the backend instead providing a constant value. Put the cursor before the third comma (from left side). Select theCurrencyCodeproperty under theSalesOrderHeaderand click Insert to generate the expression.
CurrencyCode Property Bound To Formatter The generated expression looks like below:
JSON$(C,{GrossAmount},{CurrencyCode},'',{minimumIntegerDigits:1,minimumFractionDigits:0,maximumFractionDigits:2,useGrouping:true})Click OK.
For more details on these formatters, check the help documentation.
You will now format the Subhead property’s value
{CreatedAt}usingDateTimeformatter.Syntax: $(DT, <Value>, <Locale>, <Timezone>)Click the link icon for the Subhead property.
Cut or remove the default expression in the object browser, select i18n Objects in the dropdown, select
DateTimein the formatters dropdown.Select Medium for Display Format and click Insert to generate the expression, do not close the Object Browser window.

DateTime Formatter Expression Generated The generated expression should look like below:
JSON$(DT,'','',{format:'medium'})You will now bind the
DateTimevalue placeholder with theCreatedAtproperty of theSalesOrderHeadersentity. Put the cursor before the second comma (from left side). Choose OData Objects option from the dropdown, select theCreatedAtproperty under theSalesOrderHeaderand click Insert to generate the new expression.
CreatedAt Property Bound To DateTime The new expression looks like below. Click OK.
JSON$(DT,{CreatedAt},'','',{format:'medium'})For Time formatter, you must still provide the full date-time value, the result will only include time portion.
You will now deploy the updated project to your MDK client.
Click the Deploy option in the editor’s header area, and then choose the deployment target as Mobile Services

Tap Check for Updates in the user menu on the Main page, you will see a New Version Available pop-up, tap Now.

Android New Version Available Popup Navigate to
SalesOrderHeaderslist page. You will notice the formatted values as per device’s or app’s current locale and timezone.
Android Sales Order Headers Formatted Values Go to your device settings and change the device language to Deutsch. Relaunch the MDK client, you will now notice the localized strings on main page.

Android Main Page With German Localization 
Android German Localized Strings Detail Tap
Kundenaufträgeto navigate to Sales order list page. You will notice the updated formatter values as per device’s current locale and timezone.
Android Sales Order Locale Formatted Values
Tap Check for Updates in the user menu on the Main page, you will see a New Version Available pop-up, tap Now.

iOS New Version Available Popup Navigate to
SalesOrderHeaderslist page. You will notice the formatted values.
iOS Sales Order Headers Formatted Values Change the device language to German. (Settings>General>Language & Region>Preferred Languages). Relaunch the MDK client, you will now notice the localized strings on main page.

iOS Main Page With German Localization Tap
Kundenaufträgeto navigate to Sales order list page. You will notice the updated formatter values as per device’s current locale and timezone.
iOS Sales Order Locale Formatted Values
Resources
Discussion
Share feedback on this tutorial or join the conversation in SAP Community.

