How to Add languages
How to add languages and make a default language
In the root directory, there is a folder called locales, which is where all the languages are stored
In the locales folder, if your prefered language isn't available, you can add that by creating a file and giving it the shortcode of the language, for example, English will be en, Spanish will be es and French will be fr, you can google it if you're not sure of what yours is.
After creating the file, copy content from either of the existing languages and change the texts on the right side to the language you want to add.
to set a default language, within the root directory, in the folder called src, there is a file called i18n.js, within it, scroll to an export function called createI18n, within that function, you will see on the first line a word locales, and beside it in comment, 'en', change it to the language shortcode you want to be the default language, so if you want to make french default, you put fr there or Spanish you put es there and you are done, save and run your code.
Last updated