WordPress.org

Ready to get started?Download WordPress

Forums

Semiologic language problem (15 posts)

  1. karecki
    Member
    Posted 8 years ago #

    Hi all

    I'm having a strange (straight forward for others, I'm sure) thing happening, and I have located it to be a theme issue.

    My site is in danish - except for the month in posts. So when I view a post with it's comments, it says:

    23. January, 2006
    (post)
    23. januar, 2006.
    (comment)

    When changing the theme to anything else there is no problem.

    http://www.naargudkalder.dk/?p=1#comments

    Now, I think that's weird! And since my talents are limited to css and html, I just haven't got a clue what to look for.

    Please help :-)

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

    The file 'locale.php' holds month information, so that is probably worth a look.

    wp-includes/locale.php

  3. mattman
    Member
    Posted 8 years ago #

    Pardon my bluntness(or ignorance),

    but what does this have to do with Semiologic?

  4. karecki
    Member
    Posted 8 years ago #

    That's the theme I'm using. When changing from the Semiological theme to any other theme, the problem disappears.

  5. karecki
    Member
    Posted 8 years ago #

    Just tried to alter the text in locale.php - doesn't make a difference.

  6. Denis de Bernardy
    Member
    Posted 8 years ago #

    i imagine that a filter is not applied where it should be.

  7. karecki
    Member
    Posted 8 years ago #

    Sorry, but you lost me there. Where do I look for a filter and what do I do with it.

    As mentioned earlier I know absolutely nothing about php - I love the way it works, though.

    And I'm very keen on your theme. It's extremely cooperative with someone like me ;-)

  8. Denis de Bernardy
    Member
    Posted 8 years ago #

    i'm afraid there's not much i can do short of spending an hour or two on it. fixing this means adding code to work around a bug that is introduced by wp code meant to fix what looks like an underlying php design flaw.

    i'm using a $post_date variable in the template, which i define as follows:

    $post_date = apply_filters('the_date', date($params['date_format'], strtotime($post->post_date)));

    the translation apparently occurs in a function called mysql2date(), which needs to be called before the filtering. workflow-wise, this makes no sense, since the filtering can transform the date. the translation should be hooked late into the_date and the_time.

    as for the rational for using mysql2date() rather than strtotime(), it looks as if the purpose is to work around the fact that php does not localize the time string.

  9. davidhouse
    Member
    Posted 8 years ago #

    I don't think strtotime() worked with MySQL dates prior to 4.3.

  10. karecki
    Member
    Posted 8 years ago #

    I have found this in template-functions-post.php:
    $output .= " " . mysql2date($format, $cur_page['ts']);

    Does this have anything to do with it?

    Do I add your code somewhere in relation to this, or will it be much more complicated than that...

    ...not feeling less lost :-(

  11. Denis de Bernardy
    Member
    Posted 8 years ago #

    I'm sorry karecki, but as mentionned above, it's quite hopeless to fix short of spending a non-neglectible time on it. I'll take care of it eventually if the WP bug I filed doesn't get fixed, but this will remain low-priority.

    @david: strtotime() has always worked well with mysql datetimes.

  12. thob
    Member
    Posted 8 years ago #

    I'd be more than happy when this date issue will get fixed. It's a showstopper for non-English users/customers.

    Thanks Thomas

  13. Rosy
    Member
    Posted 8 years ago #

    Innovation that regards the fix?
    Thanks Rosy

  14. charasala
    Member
    Posted 7 years ago #

    Hello Friends,
    Is there a fix for this issue yet. Even I translate the months and weeks in locale.php still my blog shows months and dates in English.

    Do I need to do anything else?
    Kindly help me.

    -- Prasad

  15. Denis de Bernardy
    Member
    Posted 7 years ago #

    I dare hope it works, I've been using the WP internal functions for this kind of thing since v.4. File the bug for the_date() in trac.wordpress.org if it still doesn't work.

    D.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags