SAP

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
⤢ Open full site

Add Localization to Luigi React Application

Enable your main application to be displayed in multiple languages using the Luigi localization features.

Overview

🎓 beginner 10 min. User InterfaceBeginnerJavascript

You will learn

  • How to add localization to the part of your application developed with React
Johannes Doberer J Johannes Doberer August 21, 2026
Created by December 10, 2024
Contributors

More from Johannes Doberer

See all 7 tutorials by Johannes Doberer →

Prerequisites

Steps

Step 1 Configure localization in Luigi navigation

In this step, you will update the Luigi configuration with the labels for the German language localization that will be implemented in the later steps.

  1. Open react-core-mf/public/luigi-config.js.

  2. Change the label attribute of the products and order node as shown below:

    JavaScript
    children: [
            {
                pathSegment: "products",
                //<---Around line 13, change this label---> 
                label: "PRODUCTS",
                //<------>
                icon: "product",
                viewUrl: "/sampleapp.html#/microfrontend/products",
                keepSelectedForChildren: true,
                children: [{
                    pathSegment: ':id',
                    viewUrl: '/sampleapp.html#/microfrontend/productDetail/:id',
                    context: { id: ':id' }
                }]
            },
            {
                pathSegment: 'order',
                //<---Around line 25, change this label--->
                label: 'ORDERHISTORY',
                //<------>
                icon: 'history',
                viewUrl: 'http://localhost:8080/index.html'
            }
        ],
  3. Add the following translation for German inside the myTranslationProvider function:

    JavaScript
    var dict = {
      "en-US": { PRODUCTS: "Products", ORDERHISTORY: "Order History" },
      //Around line 55, add the following: 
      "de-DE": { PRODUCTS: "Produkte", ORDERHISTORY: "Bestellungen" },
      //<------>
    };
Step 2 Add second language in `language.js`
+
Step 3 Configure localization in React app
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 3
1. Configure localization in Luigi navigation 2. Add second language in `language.js` 3. Configure localization in React app