Swap text to your desired language easily!
To use this tool, initialize the localization tool with the object pointed towards the csv file. (.csv file must be formated like it is in the repository!)
localization = Localization("localization.csv")
Set the localization tool to your language.
localization.set_language("en")
Now you can get the text based on the key it is matched to.
print(localization.get_text("label_text"))
Output: This is a label
If you change the language later on in the program, it will change the text.
localization.set_language("es")
print(localization.get_text("label_text"))
Output: Esta es una etiqueta
You are free to use the localization.py code however you like. No attribution is required.