view pyntnclick/i18n.py @ 834:f9a7bd975f2b pyntnclick

Blank computer in engine room
author Neil Muller <neil@dip.sun.ac.za>
date Tue, 29 Jan 2013 17:38:44 +0200
parents beac13c4e982
children
line wrap: on
line source

# internationalization

from gettext import gettext
from pkg_resources import resource_filename


def _(s):
    return unicode(gettext(s), "utf-8")


def get_module_i18n_path(module, path='locale'):
    """Get the locale data from within the module."""
    return resource_filename(module, path)