Setting default Language
To set the default language of your app
The template comes with the support of six languages namely English, Chinese, Spanish, Italian, French, and Arabic. In order to set any language as the default language, you need to follow the steps given below:
- 1.Go to the file defaultContext.js placed at the path:-
src/@jumbo/components/contextProvider/AppContextProvider/defaultContext.jsThe above has an
export defaultstatement where an object is exported. This object has a property named
defaultLng. This is the property responsible for setting the default language of the template.
- 2.The available options for the "defaultLng" can be found in the file placed at the following path:
src/@jumbo/components/AppLayout/partials/LanguageSwitcher/data.jsIn the file, you will see an array of objects named "LanguageData". The objects in the array are the language options, you have to pick the object with the value of the language you want to set and then assign that value to the
defaultLng(as per defined in point #1).Once the value is set, you can now refresh the page to see the changes applied.