What about replacing print('Hello world')
with print(lang['Hello world'])
and defining a few lang modules like this:
lang-en.py
lang = {
'Hello world': 'Hello world',
'Hello moon': 'Hello moon',
}
lang-it.py
lang = {
'Hello world': 'Ciao mondo',
'Hello moon': 'Ciao luna',
}
Then all you need to do is import the correct lang-xx.py
.
Most advanced editors (PyCharm, Notepad++) allow to do this with a regex find and replace.