def render(self, context):
        locale = resolve_variable(self.locale, context)
        if utils.supported_language(locale) is None:
            raise ValueError("locale not in settings.LANGUAGES: %s" % locale)
        path = self.urlnode.render(context)
        if self.urlnode.asvar:
            self.urlnode.render(context)
            context[self.urlnode.asvar] = chlocale(context[self.urlnode.asvar],
                    locale)
            return ''
        else:
            return chlocale(path, locale)
dataset/ETHPy150Open carljm/django-localeurl/localeurl/templatetags/localeurl_tags.py/LocaleURLNode.render/original