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.
Can't find a movie or TV show? Login to create it.
Want to rate or add this item to a list?
Not a member?
Reply by robbie3999
on July 21, 2023 at 9:25 PM
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:
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?
Reply by alex6dj
on July 21, 2023 at 10:01 PM
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.
Reply by ticao2 š§š· pt-BR
on July 23, 2023 at 6:46 PM
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
This list must be out of date by now.