Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Language chooser is broken with prefix_default_language=False #327

Closed
julianwachholz opened this issue Oct 20, 2023 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@julianwachholz
Copy link
Contributor

julianwachholz commented Oct 20, 2023

Django version
1.9 and up

Current behavior (bug description)

  • In a Django project with i18n_patterns(..., prefix_default_language=False) the language picker will not be shown unless the user is already on a non-default language.
  • When using the language chooser to go back to the default language, it gets hidden.

Expected behavior

  • Language chooser should work the same as with with prefix_default_language=True.

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@julianwachholz julianwachholz added the bug Something isn't working label Oct 20, 2023
julianwachholz added a commit to julianwachholz/django-admin-interface that referenced this issue Oct 20, 2023
- Allows usage of i18n_patterns with prefix_default_language=False
- Change templatetag from simple tag to an inclusion tag
- Reduces complexity by relying on Django's behavior in the
  set_language view: it will translate any url passed as 'next'.
  This behavior has been present since Django 1.9.
- Remove individual forms for each language

Fixes fabiocaccamo#327

Reference: django/django@aa5ab11
@fabiocaccamo
Copy link
Owner

@julianwachholz thank you for reporting this issue!

@fabiocaccamo
Copy link
Owner

fabiocaccamo commented Dec 5, 2023

@julianwachholz you can upgrade to 0.27.0 version, thanks again for the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants