Sorry I mean Backend :)
After solving the frontend part, I noticed that Hijri date is still resolved from BE, and nothing to do now with frontend. Can you please guide me to the right place to change this on BE without affecting the translation to Arabic on BE.
Hi @ismcagdas
Angular I just added the following mapping in AppConfig:
{
"from": "ar",
"to": "en"
}
Moment I added a helper method that takes care of mapping Moment locale in AppPreBootstrap. In my case ar-kw was fine:
public static mapCultureForMoment(currentCulture: string): string {
const cultureMap = {
'ar': 'ar-kw'
};
if (cultureMap[currentCulture]) {
return cultureMap[currentCulture];
}
return currentCulture;
}
I still have something to update to reflect this on Date format Pipe
UPDATE: I think I've managed this by changing locale of Angular and MomentJs. For Angular I added mappings between Arabic and the targeted locale through LocaleMapping. And the same I'm going to do with moment locale
Hi
Switching to Arabic changes Dates to to Hijri format. I want them in Gregorian. Also numbers appear in Hindu and I want them in a different locale.
Can I switch to Arabic translation while keeping Dates, Numbers and Currency in English or some other locale ?
Thanks