Поддръжка на The Movie Database

Hello i'm actually trying to get the translation for some films and series (in french) and sometimes the translation is available and other times the translation isn't available, but on the web site of THE MOVIE DB all the movies and series have a translation in french so if you know how they do or how i can have all the translation tell me please grin .

6 отговора (на страница 1 от общо 1)

Jump to last post

What's an example request that you're making that isn't working like you expect?

$movie_url = 'https://api.themoviedb.org/3/movie/44217/translations?api_key=MyAPI_KEY'; In this exemple i want the translation for vikings in french and the translation isn't available only 5 languages are available :/ and on the database website the description is in french how did you get it ?

I'm going to assume you're actually looking for the TV show Vikings, is that right? If so, you need to make a call to the TV endpoints, not movie. The id 44217 you are calling above is for the movie Jasmine Woman.

https://api.themoviedb.org/3/tv/44217/translations?api_key=###

Or better yet, with append_to_response:

https://api.themoviedb.org/3/tv/44217?api_key=###&append_to_response=translations

Thank's for the tips ( about append_to_response ) but i didn't see the translation in french :( . Should I put a translation=fr ? or something ?

Did you update your request URL to the TV method? The call you were making above is to the movie, not the TV show.

curl -v "http://api.themoviedb.org/3/tv/44217/translations?api_key=###"
*   Trying 54.235.145.144...
* TCP_NODELAY set
* Connected to api.themoviedb.org (54.235.145.144) port 80 (#0)
> GET /3/tv/44217/translations?api_key=### HTTP/1.1
> Host: api.themoviedb.org
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: ETag, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, Retry-After
< Cache-Control: public, max-age=28800
< Content-Type: application/json;charset=utf-8
< Date: Wed, 12 Dec 2018 15:14:41 GMT
< ETag: "dd854c1200631e17af0460c3c3088ca7"
< Server: openresty
< Vary: Accept-Encoding
< X-Memc: HIT
< X-Memc-Age: 19827
< X-Memc-Expires: 8973
< X-Memc-Key: d24a41d0d73496e0fd0410b2aa93ed48
< Content-Length: 21024
< Connection: keep-alive

And the response, which I've truncated but as you can see French is there:

{
  "id": 44217,
  "translations": [
    ...
    {
      "iso_3166_1": "FR",
      "iso_639_1": "fr",
      "name": "Français",
      "english_name": "French",
      "data": {
        "name": "",
        "overview": "Les exploits d'un groupe de vikings de la fin du 8ème siècle jusqu'au milieu du 11ème, mené par Ragnar Lodbrok, l'un des plus populaires héros viking de tous les temps, qui a régné quelques temps sur le Danemark et la Suède...",
        "homepage": ""
      }
    },
    ...
  ]
}

oh ok I think i found what I was looking for Thank's Travis smile

Не можете да откриете филм или сериал? Влезте, за да го създадете.

Глобални

s фокусиране на лентата за търсене
p отваряне на меню "Профил"
esc затваряне на отворен прозорец
? отваряне на прозореца за клавишните комбинации

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

b връщане назад
e към страницата за редактиране

На страниците за сезони

(стрелка надясно) към следващ сезон
(стрелка наляво) към предишния сезон

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

(стрелка надясно) към следващ епизод
(стрелка наляво) предишен епизод

На всички страници за изображения

a отваряне на прозорец за добавяне на изображение

На всички страници за редактиране

t меню за избор на език, на превода
ctrl+ s изпращане на форма

На страниците за дискусия

n създаване на нова дискусия
w статус на наблюдаване
p публична/лична
c затваряне/отваряне
a отваряне на действия
r отговаряне в дискусия
l към последния отговор
ctrl+ enter изпращане на вашето съобщение
(стрелка надясно) следваща страница
(стрелка наляво) предишна страница

Настройки

Искате ли да го оцените или добавите към списък?

Вход