Skip to content

NativeName on CurrentCulture is shorten on Blazor WebAssembly .NET 5.0 #44739

Closed

Description

@christianzingg

The following Code produces different output comparing Blazor WebAssembly 3.2.0 and 5.0.0:

Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
var native = Thread.CurrentThread.CurrentCulture.NativeName;
Console.WriteLine(native);

Blazor WebAssembly 5.0.0 --> "en (US)"
Blazor WebAssembly 3.2.0 --> "English (United States)"

PS: On normal ASP-Web application running with .NET 5.0 the output is "English (United States)"

Activity

  1. added
    untriaged
    on Nov 16, 2020
  2. added
    arch-wasm
    on Nov 16, 2020
  3. safern commented on Nov 16, 2020

    @safern
    Member
  4. removed
    untriaged
    on Nov 18, 2020
  5. added this to the 6.0.0 milestone on Nov 19, 2020
  6. csharpfritz commented on Mar 16, 2021

    @csharpfritz

    This is a regression in .NET 5 compared to all of the other .NET frameworks. Please reconsider a patch to address this for our developers and users that don't speak English

    Also: EnglishName property is misconfigured similarly

  7. tarekgh commented on Mar 16, 2021

    @tarekgh
    Member
  8. modified the milestones: 6.0.0, 7.0.0 on Jul 23, 2021
  9. removed this from the 6.0.0 milestone on Jul 31, 2021
  10. 2 remaining items

  11. csharpfritz commented on Jul 31, 2021

    @csharpfritz
  12. lewing commented on Jul 31, 2021

    @lewing
    Member

    @csharpfritz I'm disappointed too but we've run out of time to solve this more generally for .NET6.

  13. csharpfritz commented on Jul 31, 2021

    @csharpfritz
  14. self-assigned this
    on Jun 13, 2022
  15. modified the milestones: 7.0.0, 8.0.0 on Aug 12, 2022
  16. Jinjinov commented on Jan 16, 2023

    @Jinjinov

    So, the .NET 7 ship has sailed on this issue.

    Can we expect this anytime soon? :)

    I thought trimming was used to save space by removing unused code?

  17. csharpfritz commented on Jan 18, 2023

    @csharpfritz

    Can we just move this feature to an external library that is optionally included in WebAssembly deployments?

    At this point, I've written my own Dictionary object to host this content

  18. modified the milestones: 8.0.0, 9.0.0 on Jul 21, 2023
  19. added
    in-pr
    on Mar 19, 2024
  20. thomasgalliker commented on Apr 18, 2024

    @thomasgalliker

    I'm struggling with this issue on .NET MAUI (net8.0). Where can I find the native names of languages?

  21. ilonatommy commented on Apr 18, 2024

    @ilonatommy
    Member

    It was not backported to 8.0 and it's available in HybridGlobalization mode that has its side-effects - doc.
    @lewing, should we backport it?

  22. locked and limited conversation to collaborators on May 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-System.Globalizationin-pr

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions