Starts in:
1 DAY
20 HRS
38 MIN
31 SEC
Starts in:
1 D
20 H
38 M
31 S
Open Closed

Blazor UI showing wrong currency sign #927


User avatar
0
nparejod created

Check the docs before asking a question: https://docs.abp.io/en/commercial/latest/ Check the samples, to see the basic tasks: https://docs.abp.io/en/commercial/latest/samples/index The exact solution to your question may have been answered before, please use the search on the homepage.

  • ABP Framework version: v4.1
  • UI type: Blazor
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): No
  • Exception message and stack trace:
  • Steps to reproduce the issue:

Hello,

Using Blazor UI, I am having issue traying to show a dollar sign ($) in front of a monetary value:

<Field Style="text-align:right">@TotalCategory1.ToString("C0")</Field>

Currently, the value is showing this currency sign: ¤45,256

I am expecting this: $45,256

Any help fixing this issu will be appreciated.

Thanks,

Nestor


4 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I think this is related to culture.

  • User Avatar
    0
    nparejod created

    Hello, Does ABP framework have a mechanism to define the culture at the tenant lavel? I don't want to hardcode the culture code "en-us" in every single line of code that needs to show the dollar sign. Would it be possible setup a global/tenant culture variable?

    Thanks,

    Nestor

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    The microsoft localization middleware will set CurrentCulture and CurrentUICulture, and abp will use that cultures.

    CultureInfo.CurrentCulture;
    CultureInfo.CurrentUICulture;
    

    https://docs.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-5.0

    Would it be possible setup a global/tenant culture variable?

    You can add a setting that apply tenant side.https://docs.abp.io/en/abp/latest/Settings

  • User Avatar
    0
    ServiceBot created
    Support Team Automatic process manager

    This question has been automatically marked as stale because it has not had recent activity.

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06