'Return a compiled regular expression based on the active language.'

def __get__(self, instance, cls=None):

    if (instance is None):
        return self
    if isinstance(instance._regex, str):
        instance.__dict__['regex'] = self._compile(instance._regex)
        return instance.__dict__['regex']
    language_code = get_language()
    if (language_code not in instance._regex_dict):
        instance._regex_dict[language_code] = self._compile(str(instance._regex))
    return instance._regex_dict[language_code]
