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 November 17, 2026
Created on December 10, 2024
Contributors

More from Johannes Doberer

See all 7 tutorials by Johannes Doberer →

Prerequisites

Steps

Intro

In this tutorial, you will add German localization to the React part of your Luigi application by translating the Luigi navigation labels and the content rendered by the React micro-frontends.

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 27, 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 39, 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 = {
      //Around line 4, add the following: 
      "en-US": { PRODUCTS: "Products", ORDERHISTORY: "Order History" },
      "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 4
1. Configure localization in Luigi navigation 2. Add second language in `language.js` 3. Configure localization in React app 4. Tutorial navigation