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

Is it possible to get accept_languages instead of user_agent.language #62

Open
Ben-Bock opened this issue Aug 5, 2021 · 6 comments
Open
Assignees
Milestone

Comments

@Ben-Bock
Copy link

Ben-Bock commented Aug 5, 2021

Thank you so much for creating this great package!

When I'm using it in most of the cases the ua_language is empty.

I think it's because of the usage of request.user_agent.language instead of request.accept_languages.
Browsers don't so often set the language but the accepted lanuages should be there nearly every time.

A change here may be a very great thing.

Thank you so much!

@ashcrow
Copy link
Owner

ashcrow commented Aug 5, 2021

Thank you for the kind words @Ben-Bock! That sounds like a good idea. What are your thoughts on priority of the fields? Should it be request.user_agent.language first and, if empty, use request.accept_languages?

@Ben-Bock
Copy link
Author

Ben-Bock commented Aug 6, 2021

Hi, that makes sense to only go for the accepted if the other is not set explicit.
Maybe there could also be an option if one just wants to have the 1st (highest) or all accepted languages – Thx.

@ashcrow
Copy link
Owner

ashcrow commented Aug 9, 2021

Sounds good. I'll take a look at this.

@ashcrow ashcrow self-assigned this Aug 9, 2021
@ashcrow ashcrow modified the milestones: 1.1.0, 2.1.0 Aug 9, 2021
@ashcrow
Copy link
Owner

ashcrow commented Aug 16, 2021

I've started to look at how to plumb this through storage. Would you be up for helping test once I have some code up for review?

@Ben-Bock
Copy link
Author

Hi, yes sure, happy to test that once it's available.

@ashcrow
Copy link
Owner

ashcrow commented Sep 14, 2021

I haven't forgot about this :-) I should have some code up near the end of the week.

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

No branches or pull requests

2 participants