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

browser Accept-Language #3295

Closed
Grummfy opened this issue Nov 21, 2017 · 3 comments
Closed

browser Accept-Language #3295

Grummfy opened this issue Nov 21, 2017 · 3 comments
Labels
Improvement Minor improvement to code

Comments

@Grummfy
Copy link

Grummfy commented Nov 21, 2017

Hello,
now when there is someone coming to the documentation of a project, it redirect to /l$project-main-language/version . I think this pattern can be easily improved by using browser language (cf https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html )

I think the redirection is made on this code part in https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/core/resolver.py#L80

I read something about the way django interpret this code here https://docs.djangoproject.com/en/1.11/topics/i18n/

I think this feature could be configured to keep actual one or move to the new one. In any case, if redirecting to another language that the main project and that this redirection lead to a 404, I would try to see if the default one could exist. But this is extra feature.

thanks

@safwanrahman
Copy link
Member

@Grummfy Are you talking about <project_name>.readthedocs.io redirection or www.readthedocs.org redirection?

@Grummfy
Copy link
Author

Grummfy commented Nov 22, 2017

I mean
https://<project_name>.readthedocs.io
->
https://<project_name>.readthedocs.io/<project_main_language>/latest/

@RichardLitt RichardLitt added the Improvement Minor improvement to code label Nov 22, 2017
@agjohnson
Copy link
Contributor

Closing as duplicate of #4600

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Minor improvement to code
Projects
None yet
Development

No branches or pull requests

4 participants