Skip to content

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

Closed

Description

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

Activity

  1. added
    Issue-Question
    on Oct 2, 2019
  2. iSazonov commented on Oct 2, 2019

    @iSazonov
    Collaborator

    I am not sure that localized help was published. Debug shows internall exception and fallback to en-US.

  3. added
    WG-Interactive-HelpSystem
    on Oct 2, 2019
  4. mklement0 commented on Oct 2, 2019

    @mklement0
    ContributorAuthor

    The test actually tests error messages, not help content.

    I naively assumed that since localized DLLs are present in $PSHOME (although on Unix platforms there are only 2) that at least startup messages, error messages, ... would already be localized.

    Is this being tracked somewhere? Is there a roadmap?

  5. vexx32 commented on Oct 2, 2019

    @vexx32
    Collaborator
  6. iSazonov commented on Oct 2, 2019

    @iSazonov
    Collaborator

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

  7. mklement0 commented on Oct 2, 2019

    @mklement0
    ContributorAuthor

    :) Thanks, Ilya (@iSazonov) - I'm closing this.

  8. added
    Resolution-Answered
    on Oct 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-QuestionResolution-AnsweredWG-Interactive-HelpSystem

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions