WordPress.org

Ready to get started?Download WordPress

Forums

what php file contains weekdays and dates formats? (7 posts)

  1. Converge
    Member
    Posted 8 years ago #

    I downloaded and installed this and started editing my theme before i realized i wanted swedish time and date-formatting. So rather than install the swedish template and start over with the design, I thought I'd edit my existing php-file that contains the dates so that it'll output "Måndag" instead of "Monday" etc. problem is, I can't find what file to edit. Does anyone know where I should look?

  2. moshu
    Member
    Posted 8 years ago #

    Day names are in locale.php.
    The date format is either from the options or hard coded in the theme template. Either way you need to look at http://php.net/date

  3. Converge
    Member
    Posted 8 years ago #

    Ok, so now I have altered the weekdays and months in locale.php. I've also changed the date format in the Options/General-section, and from there, it looks great (i.e., the example output under the input field shows the date format exactly as I want it) BUT when I update my browser-window, nothing has changed. I've tried to make a new post, but the date-format still looks the same.

    It should read: Söndagen den 30 April, 2006 (l j F, Y)
    But it still reads: April 30th, 2006

    Any ideas?

  4. moshu
    Member
    Posted 8 years ago #

    See above: or hard coded in the theme template

  5. Converge
    Member
    Posted 8 years ago #

    hehe thanks a bunch, I found it two seconds after your reply.

    ONE final question, and then I'll leave this thread alone, I swear:

    I'd like to change the "st/nd/rd/th" suffix to something that fits better with the swedish dates. I couldn't find this one in locale.php, so apparently it's in some other php include?

  6. Mark (podz)
    Support Maven
    Posted 8 years ago #

    You'll need to go to the php.net link in Options - there they have a huge range of ways of displaying dates, times, years, days etc

  7. moshu
    Member
    Posted 8 years ago #

    I don't know of any possibility to have those suffixes translated - but that doesn't mean they don't exist. You will have to search the PHP site in your language and see if there is any solution for that.

Topic Closed

This topic has been closed to new replies.

About this Topic