How can I implement a system for changing languages in an application. I'm making an application in English and I want that when I click on a button, all the text changes to another language (French). Also i use microframework flet and i develop for mobile devices.
I'm new to programming. I think you can just try to create the same code in another human language and just switch between them. But what other options do I have?
You can store text in JSON files. When you select a language, the application loads a specific file. For example:
main.py:
main_EN.json:
main_FR.json:
This is also an easy way to scale. If you want to add new languages, just create new json files and add in the match-case statement.