Page 1 of 1

info.OriginalLanguage displayLanguage problem

Posted: 27 May 2020, 07:56
by AbedlaPaille

Code: Select all

{info.OriginalLanguage.toLocale().displayLanguage}
Works like a charm except it displays cn instead of Cantonese https://i.imgur.com/JpYovec.png.

Is this on tmdb's end?

Re: info.OriginalLanguage displayLanguage problem

Posted: 27 May 2020, 09:52
by rednoah
Cantonese is not a standard Locale, so the "cn".toLocale().displayLanguage roundtrip doesn't do anything in this case.

e.g.

Code: Select all

"zh-HK".toLocale().displayName
// Result: Chinese (Hong Kong SAR China)

:arrow: You'll probably have to do your own language code -> language name mappings if you want to cover every single non-standard corner case.

Re: info.OriginalLanguage displayLanguage problem

Posted: 27 May 2020, 11:26
by AbedlaPaille
Ok thanks! i've went with that if anyone stumbles on this

Code: Select all

info.OriginalLanguage.toLocale().displayLanguage.replaceAll(/cn/, "Chinese")
I hope it's not too offensive to Cantonese speakers :D

Re: info.OriginalLanguage displayLanguage problem

Posted: 28 May 2020, 07:18
by AbedlaPaille
Is this bugged because of TMDB : https://i.imgur.com/WbMvtiZ.png ?

Because it looks clean on their website : https://i.imgur.com/W2SWVBa.png

Re: info.OriginalLanguage displayLanguage problem

Posted: 28 May 2020, 07:28
by rednoah
AbedlaPaille wrote: 28 May 2020, 07:18 Is this bugged because of TMDB : https://i.imgur.com/WbMvtiZ.png ?

Because it looks clean on their website : https://i.imgur.com/W2SWVBa.png
Is this related to the OP in any way? This thread is about {info.OriginalLanguage} yet you highlight {collection}. Those bindings would be rather unrelated.


EDIT:

Note that I'm getting Collection Index 22 for The Adventures of Tintin (2011) probably because of this collection here:
https://www.themoviedb.org/collection/561263

Re: info.OriginalLanguage displayLanguage problem

Posted: 28 May 2020, 08:10
by AbedlaPaille
Sorry, was related in my brain as i was suspecting a tmdb error on both. Looking at the title that was poor judgement. Alright, my highlight from tmdb website means nothing then, it is part of a collection. What could cause the {ci} binding to be zero then, tmdb? I've never seen this. Yours display 22?

Re: info.OriginalLanguage displayLanguage problem

Posted: 28 May 2020, 12:55
by kim
this user (@26may)
https://www.themoviedb.org/u/Breat?language=en-US
does not know how things work at tmdb.... it's not part of this collection but
is part of https://www.themoviedb.org/movie/465404 ... tin-sequel

FYI:
https://www.themoviedb.org/collection/5 ... lter=parts