xbmc.getLanguage for "English (US)" broken?
#1
Running Kodi 18.3 on Ubuntu 18.04 with (shell) LANG=en_US.UTF-8
Kodi Settings:
    <setting id="locale.language">resource.language.en_us</setting>
    <setting id="locale.country" default="true">USA (12h)</setting>


xbmc.getLanguage(format=xbmc.ISO_639_1, region=True)
yields: "-"
 xbmc.getLanguage(format=xbmc.ISO_639_2, region=True)
yields: "-"
xbmc.getLanguage(format=xbmc.ENGLISH_NAME, region=True)
yields: "English (US)-USA (12h)"

The strings from resources/language/resource.language.en_us are read

If I change Settings.xml to:
    <setting id="locale.country" default="true">USA (12h)</setting>
    <setting id="locale.language" default="true">resource.language.en_gb</setting>

then

xbmc.getLanguage(format=xbmc.ISO_639_1, region=True)
yields: "en-"
 xbmc.getLanguage(format=xbmc.ISO_639_2, region=True)
yields: "eng-"
xbmc.getLanguage(format=xbmc.ENGLISH_NAME, region=True)
yields: "English -USA (12h)"

However, the strings from resources/language/resource.language.en_us are NOT read

On my Windows 7 (yeah, really old) gives similar, but different results:

language: English (United States)

xbmc.getLanguage(format=xbmc.ISO_639_1, region=True)
yields: "-us"
 xbmc.getLanguage(format=xbmc.ISO_639_2, region=True)
yields: "-usa"
xbmc.getLanguage(format=xbmc.ENGLISH_NAME, region=True)
yields: "English (US)-USA (12h)"


Kodi.log and getLang.py script can be found at: https://www.dropbox.com/sh/t0ewqd4r2lcqx...bBZla?dl=0

getLang.py can be run using:  kodi-send --action='RunScript("<path to getLang>/getLang.py")'
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
xbmc.getLanguage for "English (US)" broken?00