PowerShell 7.6.6 started using the system language for UI messages

0
2
Asked By MellowCedar42 On

PowerShell 7.6.6 suddenly began displaying errors, parts of Get-Help, and Ctrl+Space operator descriptions in Polish. Windows itself uses Polish, but PowerShell 5.1 and earlier PowerShell 7 versions displayed these messages in English even though $PSCulture and $PSUICulture were set to pl-PL.

For example, Get-UICulture reports pl-PL, and commands such as ls with an invalid path now produce Polish errors. Setting [System.Threading.Thread]::CurrentThread.CurrentUICulture = [cultureinfo]'en-US' changes error messages and autocomplete text, but it does not change the language used by Get-Help.

Testing showed that PowerShell 7.6.3 still displays everything in English and ignores changes to the thread UI culture, while 7.6.6 immediately switches between English and Polish when the thread UI culture changes. Is there a supported way to force PowerShell 7.6.6 and Get-Help to use English, or is this a regression or intentional behavior change?

1 Answer

Answered By BrightKoala7! On

The behavior difference between 7.6.3 and 7.6.6 strongly suggests a change or regression in the newer release. Since the thread UI culture now directly affects localized errors, this is worth reporting to the PowerShell maintainers along with the version-to-version comparison and reproduction steps. Check existing issue reports first, then include the exact output showing how changing CurrentUICulture affects 7.6.6 but not 7.6.3.

MellowCedar42 -

That makes sense. A profile setting can work around errors and completion, but it does not seem to control the language of the help templates, so reporting the change is probably the best option.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.