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

Warn users when they try to visit a page that's not available in their preferred language #1950

Closed
ghost opened this issue Jun 21, 2013 · 3 comments
Milestone

Comments

@ghost
Copy link

ghost commented Jun 21, 2013

It's considered a good practice to warn the user when she tries to visit a page
that's not translated to her preferred language. The CMS_LANGUAGES setting
allows you to fallback to another version of a page instead of redirecting you
to the home when the aforementioned page it's not available in the language you
prefer.

My suggestion is to make it possible to specify a message to be shown whenever
the we fallback to the page in another language, something along the lines of:

The page that you requested is not available in your {preferred_language}, you
can read it in {available_languages}.

We can leverage django.contrib.messages for this.

Let me know what you think and I'd be more than happy to work on this myself,
it shouldn't be too difficult and it's a little usability improvement.

@puterleat
Copy link

Related to this, I was just about to post an issue requesting a get_available_translations templatetag to supplement the get_available_languages tag... At present get_available_languages lists everything in CMS_LANGUAGES, but this isn't always want you want to display on a page when only a very few translations are likely to be available.

@digi604
Copy link
Contributor

digi604 commented Jun 26, 2013

I am not sure about using messages. But maybe different backends for this? A templatetag would be nice.

@FinalAngel FinalAngel modified the milestones: Clean up issues & pull requests, Some day Oct 19, 2015
@czpython
Copy link
Contributor

czpython commented Sep 2, 2016

Closing as this fits our feature request criteria.
If you're still interested in this feature, please create a topic in the Developers Mailing List.

@czpython czpython closed this as completed Sep 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants