Open Closed

Decimal Separator in Arabic language gives validation error #7708


User avatar
0
nabass created
  • ABP Framework version: v8.0.2
  • UI Type: MVC
  • Database System: EF Core (SQL Server )
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes/no
  • Exception message and full stack trace:
  • Steps to reproduce the issue:
  • i would like to ask about when i change language in abp application in at runtime to arabic gets error of my entity
  • because decimal field has comma separator ? any advice to make common solution
  • the following image clarify the error and display in English like "The field should be numeric from 0 to 99999"
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)

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

    hi

    Can you check this first? https://abp.io/support/questions/4102/error-in-fraction-point-in-arabic-language

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    nabass created

    Thank you for quickly response : and it is working with me after but this line System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; in webModule but there is another error because i use this line in my services var cultureName = CultureInfo.CurrentCulture.Name; and check if cultureName =='ar' do somthing, but now this variable cultureName gives me empty string , could you please advice .

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Please share some of your code.

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    nabass created

    this sample of code to get data according to selected culture //====================================================== var cultureName= CultureInfo.CurrentCulture.Name; var dbContext = await GetDbContextAsync();

    var result = (await GetDbSetAsync()) .Join(dbContext.Set<JournalVoucherStatusCulture>(), journalStatus => journalStatus.Id, journalStatusCulture => journalStatusCulture.VoucherStatusId, (journalStatus, journalStatusCulture) => new { journalStatus, journalStatusCulture }) .Where(a => a.journalStatus.JournalStatusTitle.Contains(fiscalYearStatusTitle) && a.journalStatusCulture.CultureId == cultureName) .Select(x => new JournalStatusCul { Id = x.journalStatus.Id, JournalStatusTitle = x.journalStatusCulture.JournalStatusTitle != null ? x.journalStatusCulture.JournalStatusTitle : x.journalStatus.JournalStatusTitle });

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    Can you try this?

    app.Use(async (httpContext, next) =>
    {
        if (System.Threading.Thread.CurrentThread.CurrentCulture.Name == "ar")
        {
            using (CultureHelper.Use(System.Globalization.CultureInfo.InvariantCulture, System.Globalization.CultureInfo.InvariantCulture))
            {
                await next(httpContext);
            }
        }
        else
        {
            await next(httpContext);
        }
    });
    
    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    nabass created

    I write the code which you sent as but after that when i change language from UI in the application doesn't change layout to RTL

    nothing change in Layout still menu at left side

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    I see.

    Can you try these two solutions?

    1.

    http://blog.rebuildall.net/2011/03/02/jQuery_validate_and_the_comma_decimal_separator

    2.

    https://github.com/dotnet/aspnetcore/issues/6566#issuecomment-1213584906

    Markdown supported.
    Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.8.0-preview. Updated on September 28, 2026, 11:44
1
ABP Assistant
🔐 You need to be logged in to use the chatbot. Please log in first.