The Movie Database Подршка

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 одговора (на страни 1 од 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.

Не можеш да нађеш филм или серију? Пријави се да додаш.

Глобално

s фокусирај траку за претрагу
p отворите мени профила
esc затворити отворени прозор
? отвори прозор пречице на тастатури

На страницама медија

b вратити се назад (или родитељу кад је то применљиво)
e иди на страницу за уређивање

На страницама ТВ сезона

(стрелица надесно) пређите на следећу сезону
(лева стрелица) иди на претходну сезону

На страницама ТВ епизода

(стрелица надесно) пређите на следећу епизоду
(лева стрелица) иди на претходну епизоду

На свим страницама са сликама

a отвори прозор за додавање слике

На свим страницама за уређивање

t отвори селектор превода
ctrl+ s пошаљи образац

На страницама за дискусију

n отвори нову дискусију
w мења статус гледања
p мења јавно/приватно
c мења отвори/затвори
a отвори активност
r одговор на дискусију
l иди на последњи одговор
ctrl+ enter пошаљи поруку
(стрелица надесно) следећа страница
(лева стрелица) претходна страница

Подешавања

Желите ли да оцените или додате ову ставку у листу?

Пријави се