Wsparcie 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 odpowiedzi (strona 1 z 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

Nie możesz znaleźć filmu lub serialu? Zaloguj się, aby go utworzyć.

Globalny

s zaznacz pasek wyszukiwania
p otwórz menu profilu
esc Zamknij otwarte okno
? otwórz okno skrótów klawiszowych

On media pages

b go back (or to parent when applicable)
e przejdź do strony edycji

On TV season pages

(prawa strzałka) przejdź do następnego sezonu
(lewa strzałka) przejdź do poprzedniego sezonu

On TV episode pages

(prawa strzałka) przejdź do następnego odcinka
(lewa strzałka) przejdź do poprzedniego odcinka

On all image pages

a otwórz okno dodawania obrazu

On all edit pages

t open translation selector
ctrl+ s prześlij formularz

On discussion pages

n otwórz nową dyskusję
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r odpowiedz na dyskusję
l przejdź do ostatniej odpowiedzi
ctrl+ enter wyślij swoją wiadomość
(prawa strzałka) następna strona
(lewa strzałka) poprzednia strona

Ustawienia

Want to rate or add this item to a list?

Zaloguj