Forums

Time translation issue (10 posts)

  1. Derice
    Member
    Posted 10 months 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. Derice
    Member
    Posted 10 months ago #

    No one who can help me out?

    This issue also occurs with the default theme.

  3. Derice
    Member
    Posted 10 months ago #

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

  4. Derice
    Member
    Posted 10 months ago #

    Really no one who can help me with this issue?

  5. Ginchen
    Member
    Posted 10 months 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. Derice
    Member
    Posted 10 months 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. Derice
    Member
    Posted 10 months ago #

    Any other ideas?

  8. Ginchen
    Member
    Posted 10 months 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. Derice
    Member
    Posted 10 months ago #

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

  10. Derice
    Member
    Posted 2 months ago #

    Any other ideas?

Reply

You must log in to post.

About this Topic