Apparent mistakes in multiple langinfo.xml files
#1
I am NOT an expert in this area, but have been trying to fix several problems and finding several more.
PLEASE CORRECT ME IF i AM WRONG

I am installing every Kodi language on Ubuntu and have encountered problems apparently due, in part, by incorrect langinfo.xml  "locale" values in the "region" elements. The wiki page for langinfo.xml does not address this. A good model to follow is:

.kodi/addons/resource.language.en_us/resources/langinfo.xml

A partial region element from this file is:

xml:
<language locale="en">
  <regions>
    <region name="USA (12h)" locale="US">
     <!-- the rest is optional -->
      <dateshort>MM/DD/YYYY</dateshort>
      <datelong>DDDD, MMMM D, YYYY</datelong>
      <time symbolAM="AM" symbolPM="PM">h:mmConfuseds xx</time>
      <tempunit>F</tempunit>
      <speedunit>mph</speedunit>
    </region>
...

Note that the "locale" attribute in the language element (here "en") is the iso639-1 (or iso639-2, if iso639-1 value does not exist) for the language. Further, note that the "locale" attribute of the region element (here "US") is the Iso3166-1-Alpha2 region/country/territory value.

It is unfortunate that the attribute names are not iso639-1 and iso3166-1 instead of "locale" because I think this tends to confuse the issue.

I think that sometimes, the install works because of additional info in the language addon's addon.xml as well as the way some of the code works that processes this. But still causes problems.

Here are some of the failures that I encountered. Note most have Locale names of the form
<language_code>_<LANGUAGE_CODE>.UTF-8 instead of: <language_code>_<REGION_CODE>.UTF-8

Log message 
Failed to set Locale to 'be_BE.UTF-8' fallback to 'C'  
Failed to set Locale to 'bs_bs.UTF-8' fallback to 'C'
Failed to set Locale to 'cy_CY.UTF-8' fallback to 'C'
Failed to set Locale to 'et_ET.UTF-8' fallback to 'C'
Failed to set Locale to 'fa_fa.UTF-8' fallback to 'C'
langinfo.xml fa_af region name=Iran locale=fa
addon.xml  extension point="kodi.resource.language"    locale="fa_AF">

Failed to set Locale to 'fo_FO.UTF-8' fallback to 'C'
Failed to set Locale to 'he_he.UTF-8' fallback to 'C'  
Caused by langinfo.xml
  <region name ="Israel" locale="he">
Failed to set Locale to 'hy_Hy.UTF-8' fallback to 'C'
Failed to set Locale to 'ml_ML.UTF-8' fallback to 'C'
Failed to set Locale to 'mn_Mn.UTF-8' fallback to 'C'
Failed to set Locale to 'ms_MS.UTF-8' fallback to 'C' 
Failed to set Locale to 'mt_MT.UTF-8' fallback to 'C'
Failed to set Locale to 'MY_MY.UTF-8' fallback to 'C'
Failed to set Locale to 'os_OS.UTF-8' fallback to 'C'
Failed to set Locale to 'sq_SQ.UTF-8' fallback to 'C'
Failed to set Locale to 'szl_SZL.UTF-8' fallback to 'C'
Failed to set Locale to 'ta_TA.UTF-8' fallback to 'C'
Failed to set Locale to 'tg_TG.UTF-8' fallback to 'C'
Failed to set Locale to 'uz_UZ.UTF-8' fallback to 'C'
Failed to set Locale to 'VI_VI.UTF-8' fallback to 'C'
Failed to set Locale to 'za_ZA.UTF-8' fallback to 'C'
Reply
#2
When I was looking into date formats for another issue, I found that the Wiki section on langinfo.xml could use some more details.  To this end, I have written a new Wiki article for this file, however, I am still waiting for my new Wiki account to be validated before I can make the updates.

My update includes use of the ISO codes that you describe.
Reply

Logout Mark Read Team Forum Stats Members Help
Apparent mistakes in multiple langinfo.xml files0