Đã hoàn thành

switch languages using pygettext in runtime

There is a small project:

[login to view URL]

It outputs:

'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.

Kĩ năng: Python

Xem nhiều hơn: find programming job using softwareag natural programming language, add flags switch languages joomla, voip switch portal using website, using php mysql load language site, project injection moulding drawing example, using different domain name language joomla, best possible language write crawler, modern warfare language translations, multiple language translations word, online language translations english zuluinterpret, outsourcing project injection mold, switch languages magento, japanese language translations, switch light using arduino, switch lights using arduino, switch lights using arduino wireless, english language translations, phone book using avl tree java language, switch lights using arduino wirelessly

Về Bên Thuê:
( 0 nhận xét ) Tumba, Russian Federation

ID dự án: #29077281

Được trao cho:


I am an Python Expert I can get this done for you in time. I have understand the project requirement and have gone through the code as well. Please consider me for this and text me for further details. I will provide Thêm

$25 USD trong 2 ngày
(0 Đánh Giá)

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

$20 USD trong 2 ngày
(1 Nhận xét)