Activities of "hussein"

custom middleware adding System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture; after app.UseAbpRequestLocalization(); didn't solve it what do you mean by add custom middleware?

  • ABP Framework version: v7
  • UI type: MVC
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

when I change the language to Arabic (RTL) , the issue appears in the localization of numbers such as the "," instead of "."

i added the following code:

`

public override void OnApplicationInitialization(ApplicationInitializationContext context)
    {
        var app = context.GetApplicationBuilder();
        var env = context.GetEnvironment();
        if (env.IsDevelopment())
        {
            app.UseDeveloperExceptionPage();
        }
        var dateformat = new DateTimeFormatInfo
        {
            ShortDatePattern = "MM/dd/yyyy",
            LongDatePattern = "MM/dd/yyyy hh:mm:ss tt"
        };
        var defaultDateCulture = "ar";
        var ar = new CultureInfo(defaultDateCulture);
        ar.NumberFormat.NumberDecimalSeparator = ".";
        ar.NumberFormat.CurrencyDecimalSeparator = ".";
        ar.DateTimeFormat = dateformat;
        var en = new CultureInfo("en");
        en.NumberFormat.NumberDecimalSeparator = ".";
        en.NumberFormat.CurrencyDecimalSeparator = ".";
        en.DateTimeFormat = dateformat;
        var supportedCultures = new[]
        {
               ar,
               en,
            };
        app.UseAbpRequestLocalization(options =>
        {
            options.DefaultRequestCulture = new RequestCulture("ar");
            options.SupportedCultures = supportedCultures;
            options.SupportedUICultures = supportedCultures;
            options.RequestCultureProviders = new List<IRequestCultureProvider>
                {
                    new QueryStringRequestCultureProvider(),
                    new CookieRequestCultureProvider()
                };
        });
        app.UseAbpRequestLocalization();

the above code didn't work for me but I use to add the following line on each razor page

System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.InvariantCulture;

my question here: how i configure my app to take it automatically instead of modifying the code for each page? and I want to make the digits count after the decimal point in a specific format for all language

question #2: can i only use the following code in the other language?do i need to make extra step to work instead of the above code

abp.localization.currentCulture
{
  "displayName": "Arabic",
  "englishName": "Arabic",
  "threeLetterIsoLanguageName": "arb",
  "twoLetterIsoLanguageName": "ar",
  "isRightToLeft": true,
  "cultureName": "ar",
  "name": "ar",
  "nativeName": "Arabic",
  "formatNumber":" <<<<<<<<?
  "dateTimeFormat": {
    "calendarAlgorithmType": "SolarCalendar",
    "dateTimeFormatLong": "dddd, MMMM d, yyyy",
    "shortDatePattern": "M/d/yyyy",
    "fullDateTimePattern": "dddd, MMMM d, yyyy h:mm:ss tt",
    "dateSeparator": "/",
    "shortTimePattern": "h:mm",
    "longTimePattern": "h:mm:ss tt"
  }
}

e an article about them

I see we are talking about how to implement things with the ABP framework, if we chose .net framework instead of ABP framework it will be easier for us as developers to make a workaround or you can find many articles to guide us, but when it comes to the ABP.IO always spent extra time to find a workaround for some things! for sure I don't mean underestimating ABP.IO, but the team who build it understands it better than us I'll remind you with the statement "We chose ABP.IO to focus on business " which means not to spend extra time to find a workaround especially when it comes to the Commerical version.

It is more accurate to create an article request about it at https://github.com/abpframework/abp/issues with community-article-request label.

I did!!!!

is that mean ABP's teams don't have knowledge about that? or has no one tried it before?

no answer their , that didn't help my knowledge that the ReportViewer applies to the ASP.NET 4.x (.NET Framework) webform application, (if am right) and the abp based on .net core

thanks enisn

  • ABP Framework version: v6.0.2
  • UI type: MVC
  • DB provider: EF Core / MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

could you guide us on how to integrate SQL Server Reporting Services (SSRS) with Abp? thanks in advance :)

thanks enisn appreciated , could you share with me the EditModal and the code behind the file for the razor page what about my second question plz?

  • ABP Framework version: v6.0.1
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): no
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

1- I want to customize the user UI, to add a new tab page when editing the user

2- how to prevent a user who has the privilege to manage the users from deleting the Admin user or Sys Role?

hello liangshiwei, the job calls a function in the domain layer, I realized that no filter no tenant no user logged :) so i updated the function to disable all the filters and add the unit of work inside the method 1- I don't know if this is a good practice or not, especially since it may have about 4M records! your advice plz

2- kindly could you guide me on how I use it with application service layer?

i modified my code as the following , maybe it will help the others :)

public async Task CalcInvoicesForAllBatches(bool fromJob=false)
{
    List<Guid> TenantList = new List<Guid>();
    if (fromJob)
    {
        TenantList = (await _tenantRepository.GetListAsync()).Select(x=>x.Id).ToList();
     }
     else
     {
         TenantList.Add( _currentTenant.GetId());
     }
     if (fromJob) using (_dataFilter.Disable<ICompanyFilter>())
     if (fromJob) using (_dataFilter.Disable<IBranchFilter>())
     if (fromJob) using (_dataFilter.Disable<IOfficeFilter>())
     if (fromJob) using (_dataFilter.Disable<IRegistryFilter>())
     //if (fromJob) using (_dataFilter.Disable<IMultiTenant>()) didnt work, it will include host =null
     foreach (var tenant in TenantList)
     using (_currentTenant.Change(tenant))
     using (var uow = _unitOfWorkManager.Begin())
     {
         var querable = await _billingBatchRepository.GetQueryableAsync();
         var query = querable.Where(q => q.EndTime == default && q.StartTime == default
         && q.ExecutionTime <= DateTime.Now
         ).Select(x => x.Id);
         var  list = await AsyncExecuter.ToListAsync(query);
         foreach (var id in list)
         {
         await CalcInvoicesByBatchId(id);
         }
     }
 }

3- how i can localize and translate the background dashboard? 4- is it ok to keep the default workers as the following output? if i want to minimize it how i can configure it to increase running time intervals

Showing 1 to 10 of 18 entries
Made with ❤️ on ABP v9.2.0-preview. Updated on January 14, 2025, 14:54