Hi,
I have a problem retrieving "readable" (latin characters) actor names from API v3 for e.g. for the movie "Parasite". A closer look at the website displaying the movie in German language (https://www.themoviedb.org/movie/496243?language=de-DE) shows an actor with the name "Lee Sun-kyun".
But this name is not available querying the API: https://api.themoviedb.org/3/movie/496243?append_to_response=credits&language=de-DE
{
"name": "이선균",
"original_name": "이선균",
"character": "Park Dong-ik",
...
}
https://api.themoviedb.org/3/person/115290?language=de-DE
{
"also_known_as": [
"Lee Seon-gyun ",
"Ли Сон Гюн",
"Seon-gyun Lee",
"이선균",
"Lee Sun Gyun",
"李善均",
"Sun-kyun Lee"
],
"name": "이선균",
...
}
Only small differences but no "Lee Sun-kyun".
But if I access the actors TMDB website (https://www.themoviedb.org/person/115290?language=de-DE) his name is again "Lee Sun-kyun" (not "Lee Seon-gyun " or "Sun-kyun Lee"). I really can't figure out where that name comes from for language=de-DE
.
Only if I would make the requests with en-US
I get the exact name. But it doesn't feel right to make extra requests for every actor to get a "readable" name for a German audience and I can't imagine that the website does it that way. Is there anything I am missing from the docs?
Thank you in advance for your ideas on how to get "proper" latin actor names querying a movie in German language and perhaps for an insight of how the website does the trick.
Matthias
فیلم و نمایش تلویزیونی را نمیتوانید پیدا کنید؟ به سیستم وارد شوید تا آن را ایجاد کنید.
آیا میخواهید به این مورد امتیاز دهید یا به فهرست اضافه کنید؟
عضو نیستید؟
پاسخ توسط Travis Bell
در تاریخ نوامبر 4, 2024 ساعت 12:39 ب.ض
Hi @matthias.thieroff,
Two things:
First, the website is returning the English name. Upon taking a look at the API, I realized that when we deployed the translated names on the website a few months ago, we never deployed the new name field on the person translations endpoint.
I've just deployed that update now, and once all of the endpoints expire over the next few hours, you'll start to see the updated data.
Second, we do not yet support fallbacks on any API calls. There is an open ticket for that here.
Thanks!
پاسخ توسط matthias.thieroff
در تاریخ نوامبر 5, 2024 ساعت 2:50 ق.ض
Hi @travisbell,
thank you for your quick reply and your great work!
You're right, the actor's details page is in English (I was so focused on the actor's name and the URL that I didn't noticed it). But on the movie's website, everything is German, but the "English" actor's name is used. How was that achieved? I would have expected 이선균 for the German translation.
I also saw that the
translations
endpoint was updated, but I must admit that I still don't fully understand it. I can't have the translations from person attached to the movie-details request. So what would be the right way if I wanted to get the movie-details and the credits in German (or at least the "western" name representation in the credits)?Best Matthias
پاسخ توسط talestalker
در تاریخ نوامبر 5, 2024 ساعت 9:11 ق.ض
Would it be also possible to add a primary translation indicator? This is now the last missing piece of information that prevents me from finding and correcting all misassigned primary translations (e.g. fr-CA instead of fr-FR).
پاسخ توسط talestalker
در تاریخ نوامبر 5, 2024 ساعت 10:01 ق.ض
I see Korean name 이선균 on the German profile page of Lee Sun-kyun. Maybe you have English as fallback language set in your TMDb profile?
To get the movie cast and crew, you need to use the
movie details
API method withappend_to_response=credits
parameter, e.g.:If you use
language=de-DE
you will get all data in German localization (if available in German). Because translations of person names are a relatively new feature, Korean names are not yet transliterated into German and therefore the API falls back to name primary translations by default, which is in the case of Parasite cast Korean. The TMDb API does not allow you to set a custom fall back language (e.g. English), but as Travis mentioned above this is a planned future feature whose open ticket can be found here.So if you need to query movie details with a cast and crew in German and get person names either in German translation or in English as a fall back language, you need to use some workaround with a custom fall back on your end, such as:
[1] Make a first query with
language=de-DE
as above.[2] Make a second identical query with
language
set to some "obscure" language that is guaranteed to have no translation and thus the returned name always falls back to its primary translation, e.g. Ewe:language=ee
[3] Make a third identical query with
language=en-US
, for which the name is guaranteed to always be returned in its English transliteration.Then perform a custom name fall back for each name returned by query [1] - i.e., if name [1] is different from the name [2], then the name [1] most likely contains a German variant of the name and can therefore be kept. Otherwise, the name [1] most likely contains an untransliterated name in the original language, in which case it should be replaced by the English variant in the name [3].
پاسخ توسط matthias.thieroff
در تاریخ نوامبر 5, 2024 ساعت 10:58 ق.ض
Thank you for the detailed explanation.
If I can't avoid another request at the moment, then I will request the movie details without credits in German and then the movie credits in English. That should generate the smallest amount of data with just two requests. I also can't imagine that a cast or crew member has a different name in German than in English.
Many thanks for your support!
Matthias
پاسخ توسط Travis Bell
در تاریخ نوامبر 5, 2024 ساعت 11:11 ق.ض
Done!
پاسخ توسط talestalker
در تاریخ نوامبر 5, 2024 ساعت 11:27 ق.ض
I think that in German it is preffered to use German transliteration of Russian names, so e.g. Антон Чехов is transliterated as Anton Tschechow instead of Anton Chekhov, but that's up to you.
Great, thanks! I can't see it yet, though, I guess it wasn't deployed yet?
پاسخ توسط Travis Bell
در تاریخ نوامبر 5, 2024 ساعت 11:30 ق.ض
As soon as cached items start expiring you'll see it.