Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve title of movie in specific language #8

Closed
JackDjTom opened this issue May 2, 2023 · 2 comments
Closed

Retrieve title of movie in specific language #8

JackDjTom opened this issue May 2, 2023 · 2 comments
Labels
question Further information is requested

Comments

@JackDjTom
Copy link

Hi there,

I was wondering whether there is a possiblity to retrieve the title of a movie in a given language.

When I have the following code with the language 'de' for german:

TitleData? title = await api.TitleAsync("tt0241527", IMDbApiLib.Models.Language.de);

I get a TitleData object with the Title 'Harry Potter and the Sorcerer's Stone' and an empty string for the OriginalTitle.
Only the Plot is in german. But I need the title in german ('Harry Potter und der Stein der Weisen')

In some forums I found that you have to set the request header "Accept-Language" to the specific language, but I couldn't get that to work either.

Is there any way to get the title in german?

@HaddadCSharp HaddadCSharp added the question Further information is requested label May 3, 2023
@HaddadCSharp
Copy link
Collaborator

Hello, use the Wikipedia service to get movie titles in other languages (titleInLanguage field).

var data = await apiLib.WikipediaAsync("tt0241527", IMDbApiLib.Models.Language.de);
Console.WriteLine(data.TitleInLanguage); // Harry Potter und der Stein der Weisen

@JackDjTom
Copy link
Author

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants