Hello guys,
I have a asp zero website with 2 languages: English and Persian. When I change the language, it correctly changes the date. For example, when I set to English, the date will be rendered as the Gregorian date "05/12/2017" and when I switch the language to Persian it will be rendered as the Persian (Hijri Shamsi) date "02/22/1396". So everything works well in my local env. However, I have published my app into an Azure VM and it does not render date correctly. All languages change correctly (UI Culture), but the date is always rendered as the Gregorian date "05/12/2017". Perhaps Culture is not changed correctly. Note that I'm using the ASP.NET MVC (.net core) version. What shall I do to fix it?
Thanks, Payman
7 Answer(s)
-
0
Hi,
Can you check that if your Azure VM's operating system has persian language installed or not ?
Thanks.
-
0
Hi,
It has installed it and it correctly shows the translated texts in Persian when I choose Persian language in the website.
-
0
Hi,
Actually we didn't do anything special for supporting hijri dates. In our demo it is also showing gregorian dates when you select persian language.
Have you contacted with azure if they support this or not ?
Thanks.
-
0
Hi,
Well, after some investigations I found that despite Windows 10, Windows Server 2012 R2 (on Azure VM) does not support Persian calendar and I think that is the problem, because it works well on my Windows 10. I noticed that someone else had already asked about the issue and it is left unanswered: <a class="postlink" href="http://stackoverflow.com/questions/36400581/add-persian-calendar-to-windows-server-2012-r2">http://stackoverflow.com/questions/3640 ... er-2012-r2</a>
Thanks
-
0
Thanks for the fast response :), I was saerching for the reason.
-
0
You're welcome :)
-
0
Hi Payman, Any chance that you share your solution of switching calendars Eng<>Persian? What Angular component did you end up using for the DatePicker? I have already found this [https://github.com/fingerpich/jalali-angular-datepicker]) but it is a bit buggy!
Thanks in advance ;)