xbmc-plugin.video.ted.talks
xbmc-plugin.video.ted.talks copied to clipboard
Properly detect language code from xbmc language
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.
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.
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