Поддержка 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 отправить своё сообщение
(стрелка вправо) следующая страница
(стрелка влево) предыдущая страница

Параметры

Хотите поставить оценку или добавить в список?

Войти