دعم الموقع

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 أرسل رسالتك
(السهم الايمن) الصفحة التالية
(السهم الايسر) الصفحة السابقة

الاعدادات

هل تريد تقييم او اضافة هذا العنصر للقائمة؟

تسجيل الدخول