Skip to content

NavbarLocaleToggler

NavbarLocaleToggler consists of a menu that displays different languages available for localization that you can choose from.

Usage

File: src/layouts/components/NavbarLocaleToggler.jsx

jsx
<NavbarLocaleToggler/>

Add a new language

  1. To add a language translation, please read the instructions in localization guide.

  2. To add the translated language in the store refer to src/store/localeSlice and update the initial state as below:

js
const initialState = {
    languages: [
        {
            name: "English",
            icon: // react-country-flag,
            locale: "en",
        },
        {
            name: "Arabic",
            icon: // react-country-flag,
            locale: "ar",
        },
    ],

    // ...
};

COPYRIGHT