Fix double language codes
This commit is contained in:
parent
4d8032ce13
commit
7fe6a4c8bb
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue