Questions related to the Accept Language request header field of HTTP
Questions tagged [http-accept-language]
99 questions
1
vote
0 answers
Android Stock Browser Not Override Accept-Language
I have an Android Samsung tablet and I test this simple xhr request on its stock browser.
var url = "http://172.20.10.10:3030/whatever";
function reqListener () {
console.log(this.responseText);
}
var oReq = new XMLHttpRequest();
oReq.onload =…

Fabien de Maestri
- 11
- 2
1
vote
1 answer
.htaccess language redirect to virtual folder
I try to redirect to a virtual folder, if a specific language isnt detected, but this doesn't work:
RewriteCond %{HTTP:Accept-Language} ^!dk [NC] #if language isn't "dk"
RewriteRule ^$ /en/ [L,R=301] # rewrite to folder
RewriteRule…

phriek
- 23
- 1
- 5
1
vote
2 answers
Http Accept Language Wrong Output From Chrome, German Language (de)
I have a multilanguage website. Using htaccess
# Another Languages
#RewriteCond %{HTTP:Accept-Language} ^en [NC]
#RewriteRule ^$ /en [R=301,L]
# German
#RewriteCond %{HTTP:Accept-Language} ^de [NC]
#RewriteRule ^$ /de [R=301,L]
Problem:
I…

Muhammad Kamal
- 324
- 3
- 12
1
vote
1 answer
How to initiate query if browser language does not match database tables, which named as countries?
I am not experienced in PHP, I know only basics. I don't know if I am asking this correctly, and I don't even know if this is possible, but I will try to explain.
I have database with 10+ tables. Each table is named as country (Austria, Germany,…

Tauras
- 3,846
- 3
- 21
- 36
1
vote
2 answers
set the Accept-Language header for crawler in java
I'd like to find the correct method to set the Accept-Language header for my crawler? I read other related answers like Getting imdb movie titles in a specific language and How to set Accept-Language header on request from applet
but they didn't…

mOna
- 2,341
- 9
- 36
- 60
1
vote
1 answer
Is it possible to override the client accept-language header so that subsequest requests are in a new language?
Our business requirements state that the user should be able to change their language preference without changing their browser or system settings. Our implementation is a simple interface that asks them to choose a language. Originally, I was going…

Sinaesthetic
- 11,426
- 28
- 107
- 176
1
vote
2 answers
Match browsers set to Scandinavian languages based on "Accept-Language"
Question
I am trying to match browsers set to Scandinavian languages based on HTTP header "Accept-Language".
My regex is:
^(nb|nn|no|sv|se|da|dk).*
My question is if this is sufficient, and if anyone know about any other odd scandinavian (but…

system_failure
- 13
- 3
1
vote
3 answers
Change the language of a site using a button
Hi I want as the title says change the language of the site using a button but this without altering the url mywebsite.com (Without doing mywebsite.com?lang=es) by just changing PHP variables in this code:
$xlang =…

Joscplan
- 1,024
- 2
- 15
- 35
1
vote
1 answer
.htaccess combine multiple RewriteCond with several RewriteRule
as i am new to .htaccess, i couldn´t figure out how to make this work:
On my webserver the default index.html (/var/www/) should be redirected to different other index.html regarding the time of the day and the browser language...
/index.html…

sojourney
- 21
- 3
1
vote
6 answers
xcode - I want to receive the device language
How can I get the iPhone device language by below method to server?
$_SERVER['HTTP_ACCEPT_LANGUAGE']

Monk
- 65
- 1
- 6
0
votes
1 answer
How to setup the middleware Service in nestJs application in nestjs-i18n package to get accept-language header without error?
Hey In my nestjs application, I have installed the nestjs-i18n npm package of version 10.2.6 . I have configured this I18nModule in the appModule as below :
app.module.ts :
import { MiddlewareConsumer, Module, NestModule } from…

vijay s
- 147
- 1
- 4
- 15
0
votes
0 answers
Different 404 page based on accept-language header in Nginx
I have a simple static site generated with Jekyll that I'm using an Nginx server to host. The site is in two languages but that is currently only done with different versions of pages being at different URLs. It doesn't currently do anything with…

regret
- 25
- 4
0
votes
0 answers
MailChimp: set Language with nodejs SDK
I'm trying to set a suscriber's Language with MailChimp nodejs SDK while adding him/her to a list.
The nodejs SDK calls the API https://us2.api.mailchimp.com/3.0/lists//members, and it successfully creates a new member. However, it doesn't…
0
votes
0 answers
nginx: redirect when accept language is other than english
I have a multi-lingual website and want the URL schema to work like
https://example.com/ -> Load english version
https://example.com/path -> Load english version
https://example.com/es/ -> Load spanish…

Anuj TBE
- 9,198
- 27
- 136
- 285
0
votes
0 answers
Translate Nginx conf in Apache Htaccess
I have to change a mobile application data folder from Nginx to Apache server so I will have to use a Htaccess file instead of nginx config. I cannot translate this Nginx configuration :
location ~ ^/mobile/(.*)$ {
add_header…

mthsd
- 1
- 1