python flask detect browser language
No problem. We won‘t show you that ad again. Why didn‘t you like it?
- Uninteresting
- Misleading
- Offensive
- Repetitive
- Other
Oops! I didn‘t mean to do this.
up vote-2down votefavorite |
I need to get the browser language with Python flask. I have tried to use:
This however returns I tried whoer.net and it returned
|
||||
|
2 Answers 2
up vote0down vote |
You should check
|
||||
|
No problem. We won‘t show you that ad again. Why didn‘t you like it?
- Uninteresting
- Misleading
- Offensive
- Repetitive
- Other
Oops! I didn‘t mean to do this.
up vote0down vote |
Check out Werkzeug‘s LanguageAccept data structure, or just try something like this to get a best match:
If you need more than that, then check out Flask-Babel. |
时间: 2024-11-07 14:48:26