Thank you
Hi!
Two questions about OrganizationUnits:
Thanks
Awesome! It works just perfect now. I also followed your instructions to update the part that's required for language switching and everything just working as expected.
Thanks a million!
Thanks @ismcagdas
I already have those configurations applied sometime ago, and it helped solve the problem on frontend only.
// moment.locale(abp.localization.currentLanguage.name);
// (window as any).moment.locale(abp.localization.currentLanguage.name);
let momentLocale = LocalizedResourcesHelper.mapCultureForMoment(abp.localization.currentLanguage.name);
moment.locale(momentLocale);
(window as any).moment.locale(momentLocale);
public static mapCultureForMoment(currentCulture: string): string {
const cultureMap = {
'ar': 'en'
};
if (cultureMap[currentCulture]) {
return cultureMap[currentCulture];
}
return currentCulture;
}
The reason I say it's only backend, because for some reason, CreationTime is stored in database the correct way now (Gregorian). But when I try to edit the record, it's converted to Hijri (on backend only) and returned to client as Hijri. The steps I provided will show exactly what I mean.
I think I've solved the first issue by adding Culture date configs in ..AppServiceBase constructor Waiting your feedback about other issue
Thanks @ismcagdas
Unfortunately, it didn't work for me yet.
I'll provide an example that may help you reproduce it at your side:
Make your language Arabic
Add the culture changing code first lines of any method that returns datetime (like a DTO that inherit from FullAuditedEntityDto) something like: GetSomethingForEdit()
Observe FirstOrDefaultAsync method result to see the datetime values like CreationTime (you should get it Gregorian not Hijri)
Then check the result returned to client side (you'll get it Hijri again)
So there are two problems I'm looking for a solution for:
Thanks
Hi @ismcagdas
I was able to add the needed configurations that meet my needs, however I'm still experiencing a problem that's only backend related. When I watch the values during debugging I see the date resolved exactly as needed, but when it returns it from the service to client, it's returned again as Hijri. (I even tried it through POSTMAN to avoid any client side effects)
So I guess it's sort of OWIN Middleware you injected that changes Culture in the pipeline. I noticed you have a method called ThreadCultureSanitizer that's injected in your UseAbp OWIN extension, not sure if it's the right place.
I need your help please to know how and where I can override this behavior. (Note again please that I only use AspNetZero and I don't maintain the source of Abp)
Thanks
Awesome! thanks a lot
Hi
I'm following your tutorial to add a custom data-filter <a class="postlink" href="https://aspnetboilerplate.com/Pages/Documents/Data-Filters">https://aspnetboilerplate.com/Pages/Doc ... ta-Filters</a> I'm using AspNetZero and noticed it's not easy to support this without pulling Abp source and change it there on AbpDbContext.cs : OnModelCreating(DbModelBuilder modelBuilder)
Do you have a better workaround?
Thanks
Thank you. I'll try it, but I think this will affect the Arabic translation in server side which is something I'm not interested in. I don't want to affect the translation on frontend and backend, but only change Locale related to Dates, Currency, etc.