VMware Cloud Community
the_jinx
Enthusiast
Enthusiast

Inconsistent language detection on Windows

When run on Windows 10, our installer doesn't seem to always correctly respect the user's language settings. 



For example, our installer supports Italian localization. So we added the ' it'  string to the <allowedLanguages> project property, and we added a valid language file to the <customLanguageFileList>. 


Probably for historic reasons, on Windows the user's preferred language is determined through the ' Region -> Formats'  Control Panel. There, three different Italian language options are available:



  • Italian (Italy)

  • Italian (San Marino)

  • Italian (Switzerland)


When changing this setting to either ' Italian (Italy)'  or ' Italian (Switzerland)' , then our installer runs in Italian language; but when choosing the ' Italian (San Marino)'  setting, the installer fails to run in Italian, instead choosing the installer's default language (english). 



This problem persists with other languages as well, for example we're also supporting Russian language. There are six different variants of the Russian language, but only two of them are correctly recognized by our installer:



  • ' Russian (Belarus)'   (NOT recognized)

  • ' Russian (Kazakhstan)'   (NOT recognized)

  • ' Russian (Kyrgyzstan)'   (NOT recognized)

  • ' Russian (Moldova)'   (CORRECTLY recognized)

  • ' Russian (Russia)'  (CORRECTLY recognized)

  • ' Russian (Ukraine)'   (NOT recognized)

What am I missing? How do I make our installer recognize all variants of a certain language?




This is an excerpt from our project file:



<allowedLanguages>en de es es_AR fr it ja pt pt_BR zh_CN zh_TW ru</allowedLanguages>


<customLanguageFileList>
<!-- ' code' : supported language, ' file”: the localization file loaded for the supported language -->
<language code=' de'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_de.lng'  />
<language code=' en'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_en.lng'  />
<language code=' es'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_es.lng'  />
<language code=' es_AR'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_es.lng'  />
<language code=' fr'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_fr.lng'  />
<language code=' it'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_it.lng'  />
<language code=' ja'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_ja.lng'  />
<language code=' pt'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_pt_BR.lng'  />
<language code=' pt_BR'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_pt_BR.lng'  />
<language code=' zh_CN'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_zh_CN.lng'  />
<language code=' zh_TW'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_zh_CN.lng'  />
<language code=' ru'  encoding=' utf-8'  file=' ../LocalizedStrings/LocalizedStrings_ru.lng'  />
</customLanguageFileList>


Labels (1)
0 Kudos
6 Replies
michiel_dhont
Enthusiast
Enthusiast

Hi Dirk,

Could you tell us the value of the locale key in the HKEY_CURRENT_USER or  or Control Panel or  or International registry key?

Regards,

MIchiel D'Hont

0 Kudos
the_jinx
Enthusiast
Enthusiast

  • When I set the Format to  or ' Italian (Italy) or ' , the  or ' locale or '  key changes to  or ' it-IT or ' .
  • When I set the Format to  or ' Italian (San Marino) or ' , the  or ' locale or '  key changes to  or ' it-SM or ' .
  • When I set the Format to  or ' Italian (Switzerland) or ' , the  or ' locale or '  key changes to  or ' it-CH or ' .
  • When I set the Format to  or ' Russian (Belarus) or ' , the  or ' locale or '  key changes to  or ' ru-BY or ' .
  • When I set the Format to  or ' Russian (Kazakhstan) or ' , the  or ' locale or '  key changes to  or ' ru-KZ or ' .
  • When I set the Format to  or ' Russian (Kyrgyzstan) or ' , the  or ' locale or '  key changes to  or ' ru-KG or ' .
  • When I set the Format to  or ' Russian (Moldova) or ' , the  or ' locale or '  key changes to  or ' ru-MD or ' .
  • When I set the Format to  or ' Russian (Russia) or ' , the  or ' locale or '  key changes to  or ' ru-RU or ' .
  • When I set the Format to  or ' Russian (Ukraine) or ' , the  or ' locale or '  key changes to  or ' ru-UA or ' .
0 Kudos
michiel_dhont
Enthusiast
Enthusiast

Hi Dirk,

Please accept my apologies for the delay in my response. These languages are currently not recognized by InstallBuilder. We will look into improving this.

Regards,

Michiel

0 Kudos
AnonymousDefaul
Enthusiast
Enthusiast

Hi Dirk,

The registry entry normally has 2 keys. locale and localeName. Could you tell the value of both?

Regards,


Michiel
BitRock Support

0 Kudos
the_jinx
Enthusiast
Enthusiast

My bad, I mixed up those values... here is a correct list of Format name, localName und local:

Format / localName / local

  • or ' Italian (Italy) or '  /  or ' it-IT or '  / 00000410
  • or ' Italian (San Marino) or '  /  or ' it-SM or '  / 00000C00
  • or ' Italian (Switzerland) or '  /  or ' it-CH or '  / 00000810
  • or ' Russian (Belarus) or '  /  or ' ru-BY or '  / 00000C00
  • or ' Russian (Kazakhstan) or '  /  or ' ru-KZ or '  / 00000C00
  • or ' Russian (Kyrgyzstan) or '  /  or ' ru-KG or '  / 00000C00
  • or ' Russian (Moldova) or '  /  or ' ru-MD or '  / 00000819
  • or ' Russian (Russia) or '  /  or ' ru-RU or '  / 00000419
  • or ' Russian (Ukraine) or '  /  or ' ru-UA or '  / 00000C00

Yes, the local value  or ' 00000C00 or '  is used multiple times...

0 Kudos
michiel_dhont
Enthusiast
Enthusiast

Hi Dirk,

On Windows the installer sets it's default language from the locale value. We use the codes from the following list for all our supported languages.

https://www.science.co.il/language/Locale-codes.php 

The languages you mention appear as separate - currently unsupported - languages on the list. This will make the installer default to English. Another reason it defaults to English is that on your system these languages do not seem to have the corresponding locale value in the registry, which could explain it_SM defaulting to English.

Best regards,

Michiel

0 Kudos