【发布时间】:2015-09-11 12:01:10
【问题描述】:
我有一个名为 locale 的目录和带有语言(ru、ua、de 等的子目录.)
我的 Python 脚本已翻译:
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
如何本地化我的 GUI(开发中)?
我更喜欢使用 Glade。
【问题讨论】:
标签: python python-3.x pygobject