From 7fe6a4c8bb07d3cb7342e36b21265db6e675e24b Mon Sep 17 00:00:00 2001 From: Oleg Lavrovsky Date: Wed, 3 May 2017 16:30:02 +0200 Subject: [PATCH] Fix double language codes --- publichealth/home/templatetags/navigation.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/publichealth/home/templatetags/navigation.py b/publichealth/home/templatetags/navigation.py index 406b4ed..5bd7d5e 100644 --- a/publichealth/home/templatetags/navigation.py +++ b/publichealth/home/templatetags/navigation.py @@ -8,7 +8,7 @@ register = template.Library() @register.inclusion_tag('tags/language.html', takes_context=True) def language_switcher(context): url = context['page'].url.split('/') - if len(url) > 2 and len(url[1]) == 2: + if len(url) > 2 and len(url[1]) >= 2: url[1] = '$lang$' url = '/'.join(url) return {