Req Fixing Kodi to read the languages codes right
#1
Kodi reads some languages codes wrong if they are in this way "pt-BR" (Brazilian Portuguese) and "es-ES" (European Spanish), it reads "pt-BR" as "Portuguese - Breton" and reads "es-ES" as "Spanish - Spanish", it reads the abbreviation "BR" as the language "Breton" when it should read it as the country "Brazil" and reads "ES" as "Spanish" instead of the country "Spain", and this leads to choosing the wrong language for the audio and subtitles (usually chooses the default language), it should read the codes the same way it does in "ar-EG", Kodi reads it as Arabic, "EG" is the abbreviation of the country Egypt.

This problem is with Kodi 18 Leia RC, Windows 10, and this Netflix plugin (using paid subscription in the official Netflix site).

https://github.com/asciidisco/plugin.video.netflix




Image


Image
Reply
#2
(2019-01-21, 15:25)essam315 Wrote: Kodi reads it as Arabic, "EG" is the abbreviation of the country Egypt. I think the source of this problem is this file.
The origin of the language comes from Transifex, our translation webtool.
Image

Whether or not the language codes/descriptions have been mixed up somewhere is to be confirmed by the devs.
Reply
#3
Thank you.
Reply
#4
It looks like for some reason the region code is being translated using ISO 639-1 (two-letter language code) instead of ISO 3166-1 (two letter region code).

Aside from this, I don't think Kodi can translate the script codes from ISO 15924.  That's mainly an issue for Chinese that can use simplified or traditional scripts and a couple of east Europe languages that can use latin or cyrillic scripts.

I think it might be needed to see just what Netflix is sending in the stream (debug log would help).

In general, I think Kodi should be able to use "language" codes as defined in IETF BCP47 which more or less is consistent with Microsoft LCID definition.

scott s.
.
Reply
#5
Here is the debug log for "Spanish" "es-ES" after downloading the language from 'Download" then "Look and Feel", then "languages", then "Spanish", and choosing "Spanish" for the preferred audio and subtitle, then running the first episode from the TV show "Elite".

It downloads

C:\Users\Essam\AppData\Roaming\Kodi\addons\resource.language.es_es

https://pastebin.com/b5bNZgbG

and here are "manifest.json" and "manifest.mpd" for this episode

https://mega.nz/#!JpUEHYAI!q9Ti_OGSbGTkR...ApPIi2-ZX8

Here is the debug log for "Portuguese (Brazil)" "pt-BR" after downloading the language from 'Download" then "Look and Feel", then "languages", then " Portuguese (Brazil)", and choosing "Portuguese (Brazil)" for the preferred audio and subtitle, then running the first episode from the TV show "3%".

It downloads

C:\Users\Essam\AppData\Roaming\Kodi\addons\resource.language.pt_br

https://pastebin.com/RMJVNNyj

and here are "manifest.json" and "manifest.mpd" for this episode


https://mega.nz/#!ItUESCAY!lc22pStP7zvRa...YMWj2HurCg
Reply
#6
(2019-01-21, 22:58)scott967 Wrote: It looks like for some reason the region code is being translated using ISO 639-1 (two-letter language code) instead of ISO 3166-1 (two letter region code).

Aside from this, I don't think Kodi can translate the script codes from ISO 15924.  That's mainly an issue for Chinese that can use simplified or traditional scripts and a couple of east Europe languages that can use latin or cyrillic scripts.

I think it might be needed to see just what Netflix is sending in the stream (debug log would help).

In general, I think Kodi should be able to use "language" codes as defined in IETF BCP47 which more or less is consistent with Microsoft LCID definition.

scott s.
.
You're right. The value Kodi receives is pt-BR. Kodi simply splits by "-" and gets the language name from the language code of each side (iso 639-1). As I don't see a proper fix landing in Leia for this issue...@essam315 do you mind opening an issue in github.com/xbmc/xbmc so we can track it?

Cheers
Reply
#7
(2019-01-22, 03:08)enen92 Wrote:
(2019-01-21, 22:58)scott967 Wrote: It looks like for some reason the region code is being translated using ISO 639-1 (two-letter language code) instead of ISO 3166-1 (two letter region code).

Aside from this, I don't think Kodi can translate the script codes from ISO 15924.  That's mainly an issue for Chinese that can use simplified or traditional scripts and a couple of east Europe languages that can use latin or cyrillic scripts.

I think it might be needed to see just what Netflix is sending in the stream (debug log would help).

In general, I think Kodi should be able to use "language" codes as defined in IETF BCP47 which more or less is consistent with Microsoft LCID definition.

scott s.
.
You're right. The value Kodi receives is pt-BR. Kodi simply splits by "-" and gets the language name from the language code of each side (iso 639-1). As I don't see a proper fix landing in Leia for this issue...@essam315 do you mind opening an issue in github.com/xbmc/xbmc so we can track it?

Cheers 
I opened this issue.

https://github.com/xbmc/xbmc/issues/15308
Reply
#8
I included a few info in your issue ticket for help fix properly.
MediaBrazil forum Website - Youtube Channel
MQ9-1.6.0.29 - 09.15.2023 - Aeon MQ Skin Team
MarcosQui Website Donate and support us.
Reply
#9
(2019-01-22, 14:19)Wanilton Wrote: I included a few info in your issue ticket for help fix properly.
 Thank you for your help.
Reply
#10
(2019-01-22, 14:19)Wanilton Wrote: I included a few info in your issue ticket for help fix properly.
The suggestion is yet another workaround, I don't see it being accepted in Kodi master. Can you submit the workaround to the Netflix upstream repo for now as a temporary fix?
Reply
#11
I think is better create proper fix.
MediaBrazil forum Website - Youtube Channel
MQ9-1.6.0.29 - 09.15.2023 - Aeon MQ Skin Team
MarcosQui Website Donate and support us.
Reply

Logout Mark Read Team Forum Stats Members Help
Fixing Kodi to read the languages codes right0