Lack of interest A way to set a Accept-language header when unfurl'ing - Embedded links now use server's language

This suggestion has been closed automatically because it did not receive enough votes over an extended period of time. If you wish to see this, please search for an open suggestion and, if you don't find any, post a new one.

Mave

Active member
Hey,

My server is based in Germany. Unfortunately this results in many addons (like s9e media sites) using German language.
See below the embedded IMDB link for "Back To The Future".

VJinlS6.png


Source: https://forums.tms.sx/threads/movies-general-discussion.24954/page-18#post-339509

The only way to fix this would be to return content in English using a Accept-language: en-us, en
To do this we'd need a way to set a Accept-language header when unfurl'ing.

I'm positive I'm not the only one experiencing issues with this. Hopefully this will get implemented.
 
Upvote 4
This suggestion has been closed. Votes are no longer accepted.
Small correction: I don't think that feature would benefit any add-ons apart from those that deal with metadata. As far as mine is concerned, I don't think it would change anything. So it's mostly for unfurl'ing, but that's already plenty useful IMO.

Here's the original discussion for reference.
Yes. As Chromaniac said, IMDb probably gives you a German title because your server's IP is associated with a location in Germany. The way to fix it is to ask the IMDb server to return content in English using a Accept-language: en-us, en header. However, the box you see when posting links is not from this add-on, this is a default XenForo feature called "unfurl." Armed with this information, your best course of action is to head to the feature request forum and ask for a way to set a Accept-language header when unfurl'ing, if there isn't already an option for that. In our age of distributed, geographically-diverse cloud servers, this should be useful.

For what it's worth, IMDb does obey the Accept-language header as long as it's not en exactly. Many websites (including Google's) don't and serve pages in whatever language they think should be associated with the originating IP address.
Code:
$ curl -H "Accept-Language: en-us" https://www.imdb.com/title/tt0083190/ | grep -o "<title>.*</title>"
<title>Thief (1981) - IMDb</title>

$ curl -H "Accept-Language: de" https://www.imdb.com/title/tt0083190/ | grep -o "<title>.*</title>"
<title>Violent Streets - Der Einzelgänger (1981) - IMDb</title>
 
This is currently only exposed in the code event listeners http_client_options and http_client_options_untrusted (There isn't a http_client_options_trusted option however).

A super-tiny add-on could easily inject the accept language into outbound untrusted connections (or all connections).
 
This is currently only exposed in the code event listeners http_client_options and http_client_options_untrusted (There isn't a http_client_options_trusted option however).

A super-tiny add-on could easily inject the accept language into outbound untrusted connections (or all connections).
Thanks @Xon hopefully someone will be able to develop one.
 
Small correction: I don't think that feature would benefit any add-ons apart from those that deal with metadata. As far as mine is concerned, I don't think it would change anything. So it's mostly for unfurl'ing, but that's already plenty useful IMO.

Here's the original discussion for reference.


For what it's worth, IMDb does obey the Accept-language header as long as it's not en exactly. Many websites (including Google's) don't and serve pages in whatever language they think should be associated with the originating IP address.
Code:
$ curl -H "Accept-Language: en-us" https://www.imdb.com/title/tt0083190/ | grep -o "<title>.*</title>"
<title>Thief (1981) - IMDb</title>

$ curl -H "Accept-Language: de" https://www.imdb.com/title/tt0083190/ | grep -o "<title>.*</title>"
<title>Violent Streets - Der Einzelgänger (1981) - IMDb</title>
@JoshyPHP I have added

Code:
$config['http']['headers'] = [
    'Accept-Language' => 'en-US ,en;q=0.9, *:q=0.5'
];

Thanks to the addon developed by @Kruzya , however it's not working yet.
Is a reload of apache required?
EDIT: No, this still didn't fix the issue.
 
Back
Top Bottom