question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The current UI culture isn't respected - messages continue to be displayed in English

See original GitHub issue

Steps 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:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
iSazonovcommented, Oct 2, 2019

The localized dlls come only from .Net Core, no PowerShell dlls. It is tracked in #666 (sorry for the number 😃 )

1reaction
vexx32commented, Oct 2, 2019

/cc @SteveL-MSFT? 🙂

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found