sugar-toolkit-gtk3/sugar/activity/locale.py
2007-03-23 10:35:48 +01:00

12 lines
305 B
Python

import gettext
import os
import logging
from sugar.activity import activity
activity_path = activity.get_bundle_path()
service_name = os.environ['SUGAR_BUNDLE_SERVICE_NAME']
gettext.bindtextdomain(service_name, os.path.join(activity_path, "locale"))
gettext.textdomain(service_name)
_ = gettext.gettext