1

I have directory, which is called locale and subdirectories with languages (ru, ua, de etc.)

My Python script is translated:

from libs.gettext_windows import gettext_windows

scriptdir = os.path.abspath(os.path.dirname(__file__))  # directory with this script
# translating strings in _()
lang = gettext_windows.get_language()
translation = gettext.translation("vk_stats", localedir="{}/locale".format(scriptdir), languages=lang)
_ = translation.gettext

How I can localize my GUI (in development)?

vk_stats.ui

I prefer to use Glade.

Cyber Tailor
  • 443
  • 7
  • 18

1 Answers1

2

See this answer:

https://stackoverflow.com/a/10540744/439494

The procedure is very well explained there.

Also you might need to do this also:

https://stackoverflow.com/a/8377533/439494

Community
  • 1
  • 1
Havok
  • 5,776
  • 1
  • 35
  • 44