node-imdb-api
node-imdb-api copied to clipboard
Does it works with film title written in other languages?
Would it be difficult to implement some kind of i18n? It seems to be working just with movies given his english title.
Unfortunately, this isn't available in the upstream API that I'm using.
@roccomuso you can translate it before to use the api, in the most of cases you can get the right english title
@sunsgs Most of the time translations are completly different, just because they tend to change meanings avoiding literal translation, it wouldn't work.
The Movie DB has an 'AlternativeTitles' endpoint which you could potentially use for i18n.
https://github.com/impronunciable/moviedb/blob/v0.2.0/lib/endpoints.json#L34
Once you have the correct imdb id you can use this package to get the metadata.
Hi,
It is possible by changing the headers during the execution of "request"
eg to force english language :
request({headers: {'Accept-Language': 'en-US'}, uri: 'http://www.imdb.com/title/' + id + '/'}, function (error, response, body)
@damru let me better understand. If you provide the Accept-Language
header, the IMDB engine will search the record in a different language? Is this confirmed?
@roccomuso exactly. Basically, IMDB provides the information depending on your location. So if you are in France for example, it will provides the French title (which can be the same as the original, it is not a simple translation). And changing the headers fakes this location, so you can retrieve information in the language you want.
Definetly a wanted feature.
Cool, thanks for the input. I'll explore this as soon as I get time.
@worr Any update on this topic?
hi, any news about accept-language
request header?