def set_gettext(gettext):
    """
    Define a function that will be used to localize messages.

    .. note:: Most common function to use for this would be default :func:`gettext.gettext`
    """
    global _gettext
    _gettext = gettext
