Skip to Content
Previous

Prepare sample Fiori app for translation

By ianarm

Create an app based on a sample Fiori app and prepare it for translation with SAP Translation Hub.

You will learn

You will use a sample Fiori app to create a new HTML5 app and prepare it for translation using SAP Translation Hub.

Details


Step 1: Locate SAP Web IDE in the cockpit

In the service catalog, locate the SAP Web IDE tile by searching for Web, and then choose the tile.

Locate SAP Web IDE
Please log in to access this content.
Step 2: Open SAP Web IDE

Choose Go to Service.

Open SAP Web IDE
Please log in to access this content.
Step 3: Create a new project from a sample application

To get started with the app, choose New Project from Sample Application.

Choose new project
Please log in to access this content.
Step 4: Choose shop app

To add a project with the required files to your account, choose Shop and then Next.

Choose shop app
Please log in to access this content.
Step 5: Accept standard license conditions

Accept the standard license conditions by choosing I agree and then Finish.

Accept conditions
Please log in to access this content.
Step 6: Open project file

To be able to view the app in multiple languages and enable SAP Translation Hub to locate the resources file, you need to enter some data in the .project.json file.

Open project.json file
Please log in to access this content.
Step 7: Make project settings

In this step, you’re going to specify the domain for the texts (sales), the languages in which you want the app to be available (Danish, Dutch, English, Finnish, French, and German), and the name of the resources file (i18n).
In the .project.json file, enter a comma after the last square bracket (]) and paste the following code after the comma you entered:

"translation": {
    "translationDomain": "02",
    "supportedLanguages": "da,nl,en,fi,fr,de",
    "defaultLanguage": "en",
    "defaultI18NPropertyFile": "",
    "resourceModelName": "i18n"
  }

The result should look like this:

Define project settings manually
Please log in to access this content.
Step 8: Create run configuration

To test the application with mock data from a local system, you’re going to need a special run configuration. To do this, right-click the application and choose Run > Run Configurations.

Run configurations
Please log in to access this content.
Step 9: Choose Web application

Choose + > Web Application.

Web application
Please log in to access this content.
Step 10: Assign run application file

Now you need to do the following:

  • Under File Name, enter the application file name testFLPservice.html.
  • Under Preview Mode, choose With Frame.
  • Under Mock Data, select Run with mock data.

Once you’ve done that, choose OK.

Run application
Please log in to access this content.
Step 11: Open app in Fiori launchpad

Now you want to see what the application looks like by accessing it from a Fiori launchpad. To do this, choose the green button shown below.

Open with Fiori Launchpad
Please log in to access this content.
Step 12: Open the app

Choose the Shop tile.

Shop app

To make things look more realistic, the app uses mock data:

Fiori app with mock data
Please log in to access this content.

Next Steps

Updated 07/10/2017

Time to Complete

10 Min.

Beginner

Prerequisites

Next Steps

Next
Back to top