Multi Language

Multi Language Setting
Different Language translation settings
How to add a new language?

Let's add spanish language in the existing language.

  1. Create a new file src/Common/locales/sp.json
  2. update the below code in the src/Common/i18n.tsx file
    import translationGr from './locales/sp.json';
    const resources = {
        sp: {
        translation: translationSp
        }
    }; 
  3. To change default language to spanish? update below code in the src/Common/i18n.tsx file
    i18n
    .use(detector)
    .use(reactI18nextModule) // passes i18n down to react-i18next
    .init({
        resources,
        lng: "sp",
        fallbackLng: "sp", // use en if detected lng is not available
        
        keySeparator: false, // we do not use keys in form messages.welcome
        
        interpolation: {
            escapeValue: false // react already safes from xss
        },
    });
© Themesbrand.
Crafted with by Themesbrand