There is a small project:
[login to view URL]
'one, two, three'
If the line 13 _ = [login to view URL] is commented, then the output is translated to Russian:
'раз, два, три'.
Translation is performed using pygettext. Translations are stored in the locales folder.
There is a python module appendix.py. The module contains class Output. Output has a method additional_print().
Task: I need to switch between languages in __main__.py.
If i want to get Russian output , then _ = ru.gettext.
If i want to use English output, then _ = gettext.gettext.
I want to choose the language in __main__ only, and not in appendix.py.
No changes to the Output class should be done. The choise of the language should be somehow expanded to the [login to view URL] module. Language should not be passed as argument to the additional_print() funciton. Output class should stay in the module appendix.py. No dependency injection is possible.
2 freelancer chào giá trung bình$23 cho công việc này
Hello I need more details as how you want to switch between languages we can make an input statement where you enter the language you want Please contact me to discuss how you want it done