Hozer789
Hozer789

Reputation: 11

Questions/Problems Powerschell WinUserLanguageList

I'm building a code to fix keyboard layout situation on windows 10. With automated solution, I decided to use PowerShell. But the problem is when ever i try to set to set the WinUserLanguageList it Creates a new Belgium language list out of nowhere. Any idea on to why this?

Code

$languageslist = New-WinUserLanguageList -Language en-GB
$languageslist[0].InputMethodTips.Clear()
$languageslist[0].InputMethodTips.Add('0813:00000813')
$languageslist
Set-WinUserLanguageList $languageslist -force
Get-WinUserLanguageList

Output

LanguageTag     : en-GB
Autonym         : English (United Kingdom)
EnglishName     : English
LocalizedName   : English (United Kingdom)
ScriptName      : Latin
InputMethodTips : {0813:00000813}
Spellchecking   : True
Handwriting     : False

LanguageTag     : en-GB
Autonym         : English (United Kingdom)
EnglishName     : English
LocalizedName   : English (United Kingdom)
ScriptName      : Latin
InputMethodTips : {}
Spellchecking   : True
Handwriting     : False

LanguageTag     : nl-BE
Autonym         : Nederlands (België)
EnglishName     : Dutch
LocalizedName   : Dutch (Belgium)
ScriptName      : Latin
InputMethodTips : {0813:00000813}
Spellchecking   : True
Handwriting     : False

Wanted output

LanguageTag     : en-GB
Autonym         : English (United Kingdom)
EnglishName     : English
LocalizedName   : English (United Kingdom)
ScriptName      : Latin
InputMethodTips : {0813:00000813}
Spellchecking   : True
Handwriting     : False

LanguageTag     : en-GB
Autonym         : English (United Kingdom)
EnglishName     : English
LocalizedName   : English (United Kingdom)
ScriptName      : Latin
InputMethodTips : {0813:00000813}
Spellchecking   : True
Handwriting     : False

Upvotes: 1

Views: 557

Answers (1)

Cpt.Whale
Cpt.Whale

Reputation: 5341

The input method tips setting you're using assigns the nl-BE language:

Dutch - Belgium nl-BE: Belgian (Period) (0813:00000813)

https://learn.microsoft.com/en-us/windows-hardware/manufacture/desktop/default-input-locales-for-windows-language-packs

The input codes (keyboards) are actually a language:keyboard pair, so the 0813 says nl-BE, while 00000813 is the keyboard you want.

You can just update your inputMethodTips value to use 0809 for en-GB, with the Belgian keyboard like so:

$languageslist[0].InputMethodTips.Add('0809:00000813')

Upvotes: 2

Related Questions