Add/Remove language
How to Add/Remove Language
To Add New Language
If you want to add a new language, then copy one JSON file from the language folder and add it to the language folder, then rename it to the language code of your new language
Now open that JSON file and change the value of the string to your language string. Remember, here you need to add all strings in the file. If any string is missing in any file, then when you change that language, it will give you an error. So, add all strings in all JSON files.

Now search in the whole project "en", by pressing
Ctrl + Shift + F
. Now, where you see language code in the list, add your new language code there.Now, go to the MyProfile.dart file and locate the
addLanguageList
method. Add your new language string name there, as shown in the image below. Next, add this new language string to all the JSON files. Make sure to use the same string name on the left side, as specified in the language list. On the right side, provide the actual language name.Ensure your language name is added to all language files.
To remove language
Now search for 'en' in the entire project by pressing
Ctrl + Shift + F
. Wherever you see a language code in a list, remove the ones you don't want.
Last updated