Search code examples
seedstack

howa to change home to accueil in seedstack Business Theme


I develop an application using the theme seedstack Business Theme, the default theme generates the seedbare part with the home tab, how can I change home by acceuil or another word?

The attached image shows my problem.

!sidebare picture where i want to change the term home for acceuil

this is the code for w20.app.json file:

{
  "w20-core": {
    "modules": {
      "application": {
        "home": "/accueil/accueil"
      }
    }
  },
     "w20-business-theme": {
       "modules": {
           "main": {
               "sidebar": {
                   "width": 270
               }
           }
       }
   }
  
}


Solution

  • The home link in the sidebar is automatically generated and its label is based on the translation of i18n key w20.menu.sidebar.home in the currently active culture (or locale).

    Since you haven't configured i18n specifically in your application, the default culture is generic english ('en'). To configure i18n, add the following configuration to your w20.app.json file:

    {
      "w20-core": {
        "modules": {
          "culture": {
            "available": [ "en", "fr" ] // add any culture you need
            "default": "fr" // the default culture of your application
          }
        }
      }
    }
    

    This configuration make two cultures available in the application (generic english and generic french) with generic french as the default. A culture switcher will be displayed in the topbar.

    W20 is provided with translations for english and french only. If you need to add languages, you have to provide your own translations files. Check the documentation for more information about it.