WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Time translation issue (10 posts)

  1. Arnoud
    Member
    Posted 5 years ago #

    I am using WordPress 2.7 & qTranslate 2.
    The translation matrix works fine.
    It translates my blogs, titles, pages, etc.
    Also it translates the dates in the category list on the right hand side of my website.

    What it doesn't do is:

    Translating the date on which an entry was posted.
    For example: This entry was posted on 13 December 2008 at 23:30

    The code I use is:

    <?php
    _e(
        '<!--:nl-->'.htmlentities(
            strftime('%A %e %B %Y om %R uur.',
                strtotime(
                    the_date('Y/m/d H:i', '', '', FALSE)
                )
            )
        )
        .'<!--:--><!--:en-->'.htmlentities(
            strftime('%A, %e %B %Y at %I:%M %P',
                strtotime(
                    the_date('Y/m/d H:i', '', '', FALSE)
                )
            )
        ).'<!--:-->'
    )
    ?>

    When viewing the site in Dutch the date is returned as:
    Friday 12 December 2008 om 00:00 uur

    Note the incorrect language and time display.
    It should read:
    Vrijdag 12 december 2008 om 23:30 uur.

    Does anyone know what's wrong with the above code?
    I've been at this for days now, and it's driving me crazy!

    I've also tried the tips in this article:
    http://www.ginchen.de/en/2008/05/11/datumsformatierung-in-wordpress/
    but they didn't resolve the issue.

    Also a post at the qTranslate forum doesn't help me any further (very few responses) http://www.qianqin.de/qtranslate/forum/viewtopic.php?f=3&t=309&start=20

    I hope that someone here can help me out!

    Again, it's only just the "posted on" dates, that aren't translated.

  2. Arnoud
    Member
    Posted 5 years ago #

    No one who can help me out?

    This issue also occurs with the default theme.

  3. Arnoud
    Member
    Posted 5 years ago #

    Is my question formulated in a complex way?
    Or is additional information required?

  4. Arnoud
    Member
    Posted 5 years ago #

    Really no one who can help me with this issue?

  5. Ginchen
    Member
    Posted 5 years ago #

    Maybe Dutch locales aren't installed on your server. Maybe you should test it on another server to see if that's the reason.

  6. Arnoud
    Member
    Posted 5 years ago #

    Nope, the locales are installed on the server.
    I have verified this with the shared hosting admins.
    Also the dates in the "archive" column are translated, just not the dates on which the posts were made.

  7. Arnoud
    Member
    Posted 5 years ago #

    Any other ideas?

  8. Ginchen
    Member
    Posted 5 years ago #

    I read somewhere that you can also use setlocale(LC_ALL, 'Dutch') instead of setlocale(LC_ALL, 'nl_NL'). Maybe it's worth a try...?

    Sorry, I don't have any other ideas. :(

  9. Arnoud
    Member
    Posted 5 years ago #

    Nope, doesn't work either... :/

  10. Arnoud
    Member
    Posted 4 years ago #

    Any other ideas?

Topic Closed

This topic has been closed to new replies.

About this Topic