The Movie Database Support

Im doing a little telegram bot, used to search content over this platform. The user interactions should be minimal. All the results should be in spanish when available. So, yesterday when playing around I found that when you make a query to the API using language=es I espect that it returns any info it have using this default language (es-ES or es-MX or another). The truth in this case it defaults to es-ES then if the info is missing in this exact language it switch directly to en-US. Is there any way I can tell the API to use es-ES as primary and set es-MX as alternative in case the info exist in one or another instead to switch directly to en-US.

The test was using https://www.themoviedb.org/tv/60580-jodha-akbar (already fixed by me). In that moment the "overview" property in API was set in spanish only when using es-MX as language, because the spanish info only exist in this exact language. When using es-ES "overview" was returned in plain english.

3 replies (on page 1 of 1)

Jump to last post

Hi @alex6dj, I don't believe you can do a single query that can specify a sequence of languages to fall back on.

However, you can use the tv series translations query which will show all available translations, so you can pick which ones you want. If you only want the basic information like title and overview this may be enough.

If you need the tv series full details then you can use append_to_response to query the details and add the translations, like this:

https://api.themoviedb.org/3/tv/60580?api_key=xxxx&append_to_response=translations

There are equivalent queries for movies also.

One thing I see, for title 60580-jodha-akbar it looks like you added the es-ES overview today, but it is exactly the same as the es-MX overview. I don't know these languages but I am wondering if they are a different language how can the overview string be exactly the same?

I think the second approach will work for me, this way a single query is involved and I get all the info needed, and the changed needed in the app are minimal. About the translation, I know it is direct copy but this two languages are mostly the same except for the use of some words, it is not the case of the spanish used in Venezuela for example. But if you think the overview should be fully rewrited Im ok with that. Thanks for the fast answer.

@alex6dj said:

I think the second approach will work for me, this way a single query is involved and I get all the info needed, and the changed needed in the app are minimal.
About the translation, I know it is direct copy but this two languages are mostly the same except for the use of some words, it is not the case of the spanish used in Venezuela for example. But if you think the overview should be fully rewrited Im ok with that. Thanks for the fast answer.

I don't think it's necessary to rewrite the overview.
Unless you make a better one.
There are some languages with this duplicity of countries.
Some with a bigger difference, some with a smaller difference.
Having an overview on both is the best solution.
Even if the same.

A Language with Multiple Countries

ar  Arabic 2 (AE+SA)
de  German 3 (AT+CH+DE)
fr  French 2 (CA+CH+FR) only CA and FR
ms  Malay 2 (MY+SG)
zh  Mandarin 3 (CN+HK+TW)
pt  Portuguese 2 (BR+PT)
es  Spanish 2 (ES+MX)

This list must be out of date by now.

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login