Solved How can I add a language pack using Powershell 7?


elevenmax

Member
Local time
6:20 AM
Posts
17
OS
Windows 11
I want to add Chinese (Traditional, Taiwan) language and keyboard pinyin input. How can I do that in Powershell?
 
Windows Build/Version
23H2

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS
    CPU
    AMD Ryzen 6800H
    Motherboard
    ASUS PN53
    Memory
    DDR5 2X16GB
    Graphics Card(s)
    AMD Radeon 600M
    Sound Card
    ON BOARD
    Monitor(s) Displays
    LG 27"

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    CPU
    Ryzen 9 3900X
    Motherboard
    ASUS ROG Strix X570-E Gaming
    Memory
    G-Skill RipjawsV F4-3600C18 (16GB x 2)
    Graphics Card(s)
    Gigabyte RX 5700 XT Gaming OC
    Sound Card
    Realtek ALC1220P
    Monitor(s) Displays
    ASUS VE278 (x 2)
    Screen Resolution
    1920x1080
    Hard Drives
    Samsung 850 Pro 256GB
    Samsung 970 Pro NVMe 512GB (x 2)
    ST10000VN0004 10TB (x 2)
    ST10000VN0008 10TB (x 2)
    ST4000VN000 4TB (x 2)
    PSU
    Corsair HX1000
    Case
    Corsair Carbide 400R
    Cooling
    AMD Wraith Prism (Stock)
    Keyboard
    Logitech G213
    Mouse
    Logitech G502
    Internet Speed
    100Mbps down / 40Mbps up
    Browser
    Firefox - Chrome - Edge
    Antivirus
    Windows Defender - Clamwin
Code:
PS C:\Windows\system32> Install-Language zh-TW                                                                                                                                                                                                                                                                                                                                                                                                       
Language Language Packs  Language Features
-------- --------------  -----------------
zh-TW    LpCab           BasicTyping, Handwriting, Speech, TextToSpeech, OCR

PS C:\Windows\system32> $UserLanguageList = Get-WinUserLanguageList
PS C:\Windows\system32> $UserLanguageList.Add("zh-TW")
PS C:\Windows\system32> Set-WinUserLanguageList -LanguageList $UserLanguageList

Confirm
Continue with this operation?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
WARNING: If the Windows Display Language has changed, it will take effect after the next sign-in.
WARNING: If the Windows Display Language has changed, it will take effect after the next sign-in.

PS C:\Windows\system32> Set-WinDefaultInputMethodOverride -InputTip "0804:{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}{FA550B04-5AD7-411F-A5AC-CA038EC515D7}"
 

My Computer

System One

  • OS
    Windows 7
Code:
PS C:\Windows\system32> Install-Language zh-TW                                                                                                                                                                                                                                                                                                                                                                                                      
Language Language Packs  Language Features
-------- --------------  -----------------
zh-TW    LpCab           BasicTyping, Handwriting, Speech, TextToSpeech, OCR

PS C:\Windows\system32> $UserLanguageList = Get-WinUserLanguageList
PS C:\Windows\system32> $UserLanguageList.Add("zh-TW")
PS C:\Windows\system32> Set-WinUserLanguageList -LanguageList $UserLanguageList

Confirm
Continue with this operation?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): y
WARNING: If the Windows Display Language has changed, it will take effect after the next sign-in.
WARNING: If the Windows Display Language has changed, it will take effect after the next sign-in.

PS C:\Windows\system32> Set-WinDefaultInputMethodOverride -InputTip "0804:{81D4E9C9-1D3B-41BC-9E6C-4B40BF79E35E}{FA550B04-5AD7-411F-A5AC-CA038EC515D7}"

Thanks, is there also a way to set Keyboard layout to "Taiwan Pinyin" for the "Microsoft Bopomofo" Installed keyboard using Powershell?
 

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS
    CPU
    AMD Ryzen 6800H
    Motherboard
    ASUS PN53
    Memory
    DDR5 2X16GB
    Graphics Card(s)
    AMD Radeon 600M
    Sound Card
    ON BOARD
    Monitor(s) Displays
    LG 27"
Under Keyboards, MS Bopomofo -> Keyboard options -> Key assignment -> Keyboard layout

1702244363329.png
 

My Computer

System One

  • OS
    Windows 7
Change your keyboard mapping. Then check Get-WinUserLanguageList
Code:
PS C:\Users\GARLIN> Get-WinUserLanguageList

LanguageTag     : en-US
Autonym         : English (United States)
EnglishName     : English
LocalizedName   : English (United States)
ScriptName      : Latin
InputMethodTips : {0409:00000409}
Spellchecking   : True
Handwriting     : False

LanguageTag     : zh-Hant-TW
Autonym         : 中文(台灣)
EnglishName     : Chinese
LocalizedName   : Chinese (Traditional, Taiwan)
ScriptName      : Chinese (Traditional)
InputMethodTips : {0404:{B115690A-EA02-48D5-A231-E3578D2FDF80}{B2F9C502-1742-11D4-9790-0080C882687E}}
Spellchecking   : True
Handwriting     : True

Code:
$LanguagesList = Get-WinUserLanguageList
$LanguagesList | where { $_.LanguageTag -eq 'zh-Hant-TW' } | ForEach-Object { $_.InputMethodTips.Clear(); $_.InputMethodTips.Add('{0404:{B115690A-EA02-48D5-A231-E3578D2FDF80}{B2F9C502-1742-11D4-9790-0080C882687E}}') }
Set-WinUserLanguageList $LanguagesList -Force
 

My Computer

System One

  • OS
    Windows 7
Get-WinUserLanguageList

Change your keyboard mapping. Then check Get-WinUserLanguageList
Code:
PS C:\Users\GARLIN> Get-WinUserLanguageList

LanguageTag     : en-US
Autonym         : English (United States)
EnglishName     : English
LocalizedName   : English (United States)
ScriptName      : Latin
InputMethodTips : {0409:00000409}
Spellchecking   : True
Handwriting     : False

LanguageTag     : zh-Hant-TW
Autonym         : 中文(台灣)
EnglishName     : Chinese
LocalizedName   : Chinese (Traditional, Taiwan)
ScriptName      : Chinese (Traditional)
InputMethodTips : {0404:{B115690A-EA02-48D5-A231-E3578D2FDF80}{B2F9C502-1742-11D4-9790-0080C882687E}}
Spellchecking   : True
Handwriting     : True

Code:
$LanguagesList = Get-WinUserLanguageList
$LanguagesList | where { $_.LanguageTag -eq 'zh-Hant-TW' } | ForEach-Object { $_.InputMethodTips.Clear(); $_.InputMethodTips.Add('{0404:{B115690A-EA02-48D5-A231-E3578D2FDF80}{B2F9C502-1742-11D4-9790-0080C882687E}}') }
Set-WinUserLanguageList $LanguagesList -Force

Looks like the keyboard layout identifier isn’t associated to InputMethodTips. I manually changed the keyboard layout through the UI for the MS Bopomofo input method and the InputmethodTips was still the same even after reboot. Doing some googling and searching here could not find how to get keyboard layout identifier or registry key and seems more work than it’s worth. The manual change through the UI after running the Powershell script to install will do for now, thanks.
 
Last edited:

My Computer

System One

  • OS
    Windows 11
    Computer type
    PC/Desktop
    Manufacturer/Model
    ASUS
    CPU
    AMD Ryzen 6800H
    Motherboard
    ASUS PN53
    Memory
    DDR5 2X16GB
    Graphics Card(s)
    AMD Radeon 600M
    Sound Card
    ON BOARD
    Monitor(s) Displays
    LG 27"

Latest Support Threads

Back
Top Bottom