为WINDOWS10/windows11 添加不同语种的语言包。
需要从Microsoft 官网下载语言包ISO
windows10需要下载:
Language ISO:
FOD Disk 1 ISO:
Inbox Apps ISO:(可选)
windows11需要下载:
Language and Optional Features ISO:
Inbox Apps ISO:(可选)
下载ISO后,按需要添加语种。
########################################################
## Add Languages to running Windows Image for Capture##
########################################################
##Disable Language Pack Cleanup##
Disable-ScheduledTask -TaskPath “\Microsoft\Windows\AppxDeploymentClient\” -TaskName “Pre-staged app cleanup”
Disable-ScheduledTask -TaskPath “\Microsoft\Windows\MUI\” -TaskName “LPRemove”
Disable-ScheduledTask -TaskPath “\Microsoft\Windows\LanguageComponentsInstaller” -TaskName “Uninstallation”
reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Control Panel\International” /v “BlockCleanupOfUnusedPreinstalledLangPacks” /t REG_DWORD /d 1 /f
##Set Language Pack Content Stores##
$LIPContent = “E:”
##Set Path of CSV File##
$CSVFile = “Windows-10-1809-FOD-to-LP-Mapping-Table.csv”
$filePath = (Get-Location).Path + “\$CSVFile”
##Import Necesarry CSV File##
$FODList = Import-Csv -Path $filePath -Delimiter “;”
##Set Language (Target)##
$targetLanguage = “es-es”
$sourceLanguage = (($FODList | Where-Object {$_.’Target Lang’ -eq $targetLanguage}) | Where-Object {$_.’Source Lang’ -ne $targetLanguage} | Select-Object -Property ‘Source Lang’ -Unique).’Source Lang’
if(!($sourceLanguage)){
$sourceLanguage = $targetLanguage
}
$langGroup = (($FODList | Where-Object {$_.’Target Lang’ -eq $targetLanguage}) | Where-Object {$_.’Lang Group:’ -ne “”} | Select-Object -Property ‘Lang Group:’ -Unique).’Lang Group:’
##List of additional features to be installed##
$additionalFODList = @(
“$LIPContent\Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~~.cab”,
“$LIPContent\Microsoft-Windows-MSPaint-FoD-Package~31bf3856ad364e35~amd64~$sourceLanguage~.cab”,
“$LIPContent\Microsoft-Windows-SnippingTool-FoD-Package~31bf3856ad364e35~amd64~$sourceLanguage~.cab”,
“$LIPContent\Microsoft-Windows-Lip-Language_x64_$sourceLanguage.cab” ##only if applicable##
)
$additionalCapabilityList = @(
“Language.Basic~~~$sourceLanguage~0.0.1.0”,
“Language.Handwriting~~~$sourceLanguage~0.0.1.0”,
“Language.OCR~~~$sourceLanguage~0.0.1.0”,
“Language.Speech~~~$sourceLanguage~0.0.1.0”,
“Language.TextToSpeech~~~$sourceLanguage~0.0.1.0”
)
##Install all FODs or fonts from the CSV file###
Dism /Online /Add-Package /PackagePath:$LIPContent\Microsoft-Windows-Client-Language-Pack_x64_$sourceLanguage.cab
Dism /Online /Add-Package /PackagePath:$LIPContent\Microsoft-Windows-Lip-Language-Pack_x64_$sourceLanguage.cab
foreach($capability in $additionalCapabilityList){
Dism /Online /Add-Capability /CapabilityName:$capability /Source:$LIPContent
}
foreach($feature in $additionalFODList){
Dism /Online /Add-Package /PackagePath:$feature
}
if($langGroup){
Dism /Online /Add-Capability /CapabilityName:Language.Fonts.$langGroup~~~und-$langGroup~0.0.1.0
}
##Add installed language to language list##
$LanguageList = Get-WinUserLanguageList
$LanguageList.Add(“$targetlanguage”)
Set-WinUserLanguageList $LanguageList -force
使用POWERSHELL执行以下命令:
Set-WinSystemLocale -SystemLocale zh-TW ##设置非UNICODE默认语言,本例子是zh-TW 繁体中文-台湾,如果有非UNICODE程序如记事本乱码,必要。
Set-WinUILanguageOverride -Language zh-TW ##更改系统界面显示语言,可选,只要不是陈旧的应用,一般其UI都正常。
最后重启电脑。
MS官网链接:
https://learn.microsoft.com/en-us/azure/virtual-desktop/language-packs
https://learn.microsoft.com/en-us/azure/virtual-desktop/windows-11-language-packs