Questions related to the Accept Language request header field of HTTP
Questions tagged [http-accept-language]
99 questions
0
votes
0 answers
HttpServletRequest.getLocale() returns null even after setting "Accept-Language" header
I am setting the value of Accept-Language : en-gb, in my REST Http call, but when I am trying to fetch the locale in my code, it is showing null.
Accept-Language : en-gb
Accept-Language: da, en-gb;q=0.8, en;q=0.7
In the code…

Vineet Singla
- 1,609
- 2
- 20
- 34
0
votes
2 answers
Can Content Negotiation values be sent out of order?
I'm determining a user's language/locale from the Accept-Language header, and was wondering if they could ever be passed out of order. I've written a php sort function to make sure they are in descending order, but if it's unnecessary, I'd like to…

bearfriend
- 10,322
- 3
- 22
- 28
0
votes
1 answer
How to get JAX-RS (Jersey) to use a specific Locale when parsing url parameters and JSON? (Ideally inferred from the "Accept-Language" header)
To be more specific, right now I'm having a problem with the separator on decimal numbers (comma vs dot): If the wrong separator comes in a url parameter the webservice returns 404. But I'd like to find a proper solution that will handle the JSON…

Victor Basso
- 5,556
- 5
- 42
- 60
0
votes
1 answer
How to override Accept-Language header from Android's WebView
I have an Android application with an embedded WebView. I need to apply custom language settings for web-pages presented via this WebView. I found this related answer and gave it a try.
Specifically, the code is:
Map headers = new…

Stan
- 8,683
- 9
- 58
- 102
0
votes
1 answer
Changing request headers - Accept-encoding and Accept-language in ASP.NET
I want my .html files to be encoded in utf-8. I put the meta in the html files and globalization settings in Web.config, but still I observe that my GET requests contain Request headers such…

Halo
- 1,524
- 3
- 24
- 39
0
votes
5 answers
Using http_accept_language gem on rails 3
I'm trying to use this gem to determine the user's preferred language, and running into some trouble.
undefined local variable or method http_accept_language for #
I included the gem in the Gemfile, ran bundle install, and…

Maximus S
- 10,759
- 19
- 75
- 154
0
votes
1 answer
RewriteCond works with IE but not with Firefox or Chrome
So i searched the whole day yesterday for a solution to my problem, found similarities but nothing matching exactly. I try to write a .htacces file which is supposed to check the browser language and then redirect the user either to (GERMAN)…

jeremy.k
- 21
- 3
0
votes
1 answer
IIS 7.5 Wcf routing service. http header disappears
I have set up a wcf routing service (IIS 7.5) to sit between my winforms clients and a back-end server.
I am trying to resolve a bug which is apparently caused by the disappearance of the http header 'Accept-Language'. The client sends this header…

LOAS
- 7,161
- 2
- 28
- 25
-1
votes
1 answer
How google knows about me?
I've used curl to request www.google.com this way:
curl -v --url "http://www.google.com"
I found the result is HTTP/1.1 302 Moved Temporarily to Location: http://www.google.com.eg/.
Although when I examine the HTTP request headers, I can not find…

Muhammad Hewedy
- 29,102
- 44
- 127
- 219