The current UI culture isn't respected - messages continue to be displayed in English
See original GitHub issueSteps to reproduce
- Run on Windows.
- Make sure that
Deutsch (Deutschland)
(German (Germany) is installed as a Windows UI (display) language via the Windows 10 Settings application.
[cultureinfo]::CurrentUICulture = 'de-DE'; Get-Item nosuch 2>&1 | Should -match 'nicht gefunden'
Expected behavior
The test should succeed.
Actual behavior
The test fails:
Expected regular expression 'nicht gefunden' to match Cannot find path 'C:\Users\User\nosuch' because it does not exist., but it did not match.
That is, the error message was still emitted in English.
This is a regression of sorts from Windows PowerShell, where the above test succeeds.
However, Windows PowerShell’s problem is that [cultureinfo]::CurrentUICulture
is reset after each command line.
Environment data
PowerShell Core 7.0.0-preview.4
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Why is CurrentUICulture "DE-DE" even though I have set ...
Bear-in-mind that Microsoft, in their wisdom, don't separate the UI cultures of US English and (British) English or other Englishes.
Read more >CultureInfo.CurrentUICulture Property (System.Globalization)
Gets or sets the CultureInfo object that represents the current user interface culture used by the Resource Manager to look up culture-specific resources...
Read more >CultureInfo.CurrentCulture Property (System.Globalization)
Gets or sets the CultureInfo object that represents the culture used by the current thread and task-based asynchronous operations.
Read more >CurrentUICulture value vary based on whether resource ...
I've run across a behaviour regarding CurrentUICulture which doesn't ... browsing language (Spanish) is not defined as a resource language:.
Read more >Get Your Hands Dirty
Get Your Hands Dirty. A ceramics show at the Walker Art Center got Joe Duffy thinking about the importance of working with his...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The localized dlls come only from .Net Core, no PowerShell dlls. It is tracked in #666 (sorry for the number 😃 )
/cc @SteveL-MSFT? 🙂