correct time and date (6 posts)

  1. Fjellfinn
    Posted 8 years ago #

    How can I change from 7 August 2006 to the correct Norwegian format:
    7. august 2006 ??



    and also - how to get the correct european time format 24 hours ?

  2. tsguitar
    Posted 8 years ago #

    These should help you:

    For the Norwegian format you mention, this should do it:
    <?php the_time('j. F Y') ?>

    And 24-hour format is like this:
    <?php the_time('H:i') ?>

    Does that work?

  3. Fjellfinn
    Posted 8 years ago #

    -- if I only could find the proper *.php file to put it in :-))

    Please note!
    We DONT write
    7. August
    month is small caps like:
    7. august
    Proper norwegian is:
    tirsdag 8. august 2006
    (which is today )

  4. tsguitar
    Posted 8 years ago #

    I forgot! Go to Options >> General and scroll down the page to "Date and Time." That's where you'll want to set all of this.

    Next, go to wp-includes and find locale.php. That's where you'll make the changes so that the days of the week are in your language and the months are lowercase.

    The Codex is pretty weak on this:

    And the language repository:

    Very sad repository, though. Which languages are "nb," "nl," and "nn"? No idea. To make it worse, several of those directories don't have any files in them, sending some poor souls on a wild goose chase through "branches," "tags," and "trunks."

    If this is the correct way of going about it, if it's proper to modify the locale.php file when there's no obvious MO file for your language, let me know and I'll try to write something up for the Codex. Further, if there's an easy way to create new MO files and send them to Automattic for inclusion in the repository, write up a new posting about that.

  5. Fjellfinn
    Posted 8 years ago #

    Thank you for your kind help !
    It was the locale.php which solved it all, now my wordpress is "real Norwegian".

    Sorry that I don´t write english in my blogg, my written english isn´t that fluent.

  6. tsguitar
    Posted 8 years ago #

    No problem. Can you mark this "Resolved"? Thanks. And if you put your locale.php file somewhere, we might be able to make a MO out of it and add it to the language file repository.

Topic Closed

This topic has been closed to new replies.

About this Topic