info.OriginalLanguage displayLanguage problem

Any questions? Need some help?
Post Reply
AbedlaPaille
Posts: 99
Joined: 12 Apr 2020, 04:02

info.OriginalLanguage displayLanguage problem

Post 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?
User avatar
rednoah
The Source
Posts: 19141
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: info.OriginalLanguage displayLanguage problem

Post 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.
:idea: Please read the FAQ and How to Request Help.
AbedlaPaille
Posts: 99
Joined: 12 Apr 2020, 04:02

Re: info.OriginalLanguage displayLanguage problem

Post 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
AbedlaPaille
Posts: 99
Joined: 12 Apr 2020, 04:02

Re: info.OriginalLanguage displayLanguage problem

Post 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
User avatar
rednoah
The Source
Posts: 19141
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: info.OriginalLanguage displayLanguage problem

Post 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
:idea: Please read the FAQ and How to Request Help.
AbedlaPaille
Posts: 99
Joined: 12 Apr 2020, 04:02

Re: info.OriginalLanguage displayLanguage problem

Post 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?
kim
Power User
Posts: 1047
Joined: 15 May 2014, 16:17

Re: info.OriginalLanguage displayLanguage problem

Post 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
Post Reply