xbmc-plugin.video.ted.talks icon indicating copy to clipboard operation
xbmc-plugin.video.ted.talks copied to clipboard

Properly detect language code from xbmc language

Open moreginger opened this issue 12 years ago • 2 comments

xbmc.getLanguage() returns a string like English or Brazilian Portuguese. This needs to be mapped to an ISO-639 style language code like en or pt-br. Some effort is made to do this by using the ISO-639-1 table, but it doesn't understand language subcodes.

Surely xbmc just knows the language code somewhere but I failed to find it.

moreginger avatar May 16 '12 22:05 moreginger

Also my current mapping is broken for some obvious languages, e.g. Dutch. See #39

Did some investigation and finally filed http://forum.xbmc.org/showthread.php?tid=163023. There wasn't a way, but they are adding one :) Looks like it should be in Gotham.

moreginger avatar Apr 28 '13 19:04 moreginger

API xbmc.convertLanguage exists but it is broken for English (US) / Portuguese (Brazil) / ..., so I'm not using it.

Raised an issue with xbmc http://trac.kodi.tv/ticket/17231

moreginger avatar Jan 12 '17 23:01 moreginger