First step at activities localization.

master
Tomeu Vizoso 17 years ago
parent 04654a7eef
commit c820ca1aa6

@ -8,4 +8,5 @@ sugar_PYTHON = \
activityservice.py \
bundle.py \
bundlebuilder.py \
bundleregistry.py
bundleregistry.py \
locale.py

@ -0,0 +1,11 @@
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
Loading…
Cancel
Save