Skip to content

Commit

Permalink
Redirect all language codes to /en
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkcuys committed Sep 5, 2024
1 parent fb2e51d commit ed23152
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lernanta/apps/l10n/urlresolvers.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ def split_path(self, path_):

lang = first.lower()
if lang in l10n.locales.LANGUAGE_URL_MAP:
return l10n.locales.LANGUAGE_URL_MAP[lang], rest
#return l10n.locales.LANGUAGE_URL_MAP[lang], rest
return 'en', rest
else:
supported = find_supported(first)
if len(supported):
return supported[0], rest
#return supported[0], rest
return 'en', rest
else:
return '', path

Expand Down

0 comments on commit ed23152

Please sign in to comment.