Base solution for your next web application
Open Closed

Date Format #1580


User avatar
0
davids created

Hello,

I've completed upload of the ASP.NET Zero application to my Azure account. I note though that all dates are shown in US format (mm/dd/yyyy). I'm in Australia, so would like to see dates as dd/mm/yyyy. But I still want any US users to see mm/dd/yyyy.

Is there a setting in ASP.NET Zero to manage this or is this a server issue?

I understand dates are stored internally as UTC, so I guess it's some form of localisation setting that's needed?

Thanks, David.


6 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    This is related to selected language (culture) and momentjs actually. You can do it with 2 steps,

    1. First you need to add "English (EN-AU)" to your application languages on the language management page.
    2. Then you need to make a little change on layout.cshtml file change this line
    moment.locale('@Thread.CurrentThread.CurrentUICulture.Name.Left(2)'); //Localizing moment.js
    

    to this one

    moment.locale('@Thread.CurrentThread.CurrentUICulture.Name'); //Localizing moment.js
    

    In this way, users will be able to see dates according to their language preference. We will also include 2 step to next version, thanks for informing us.

  • User Avatar
    0
    tteoh created

    Dear Support,

    I still can't seem to find Language Preference setting by User in version (Abp.Zero v1.5.0.0)

    Please advice.

    Thanks, /Tommy

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    I'm adding a screenshot. If the language is not in this list, you can add it on languages page.

    If it is something other than this, can you explain more ?

    Thanks.

  • User Avatar
    0
    tteoh created

    Hi Support,

    At this juncture, I m still figuring how the language preference (screenshot) is being implemented. Where it is being stored as part of user-specific language preference.

    Use case: at the point of user creation, the preferred language can be set. Therefore, user is presented with the preferred language login page the first time.

    For example, the current user registration screen, language selection can be entered.

    Thanks, /tommy

  • User Avatar
    0
    tteoh created

    <cite>tteoh: </cite> Hi Support,

    At this juncture, I m still figuring how the language preference (screenshot) is being implemented. Where it is being stored as part of user-specific language preference.

    Use case: at the point of user creation, the preferred language can be set. Therefore, user is presented with the preferred language login page the first time.

    For example, the current user registration screen, language selection can be entered.

    Thanks, /tommy

    I finally figured it out and will start a separate discussion thread on this topic. Thanks.

    /tommy

  • User Avatar
    0
    ismcagdas created
    Support Team

    Thanks :)