WordPress.org

Ready to get started?Download WordPress

Forums

mysql2date in ajax module broken (5 posts)

  1. olivers
    Member
    Posted 6 years ago #

    Hi!
    I've been trying in vain to get mysql2date() showing properly localized month names in my ajax module.

    Here is the complete line:
    $date = mysql2date(get_option('date_format'), current_time('mysql'));

    Including or not including wp-config.php doesn't make a difference the month name is always displayed in English.

    Loading locale.php directly and assigning a custom $wp_locale via:
    $wp_locale_custom =& new WP_Locale();

    and consequently trying:
    echo $wp_locale_custom->get_month(1);

    DOES work! But that can't be the solution, unless I would copy and paste the complete mysql2date conversion calls...which is at best a kludge.

    Any thoughts on what to do?
    Thank you!
    Oliver

  2. olivers
    Member
    Posted 6 years ago #

    no one?

  3. olivers
    Member
    Posted 6 years ago #

    bump

  4. olivers
    Member
    Posted 6 years ago #

    Hopefully this will be fixed in a future WordPress release.

  5. object81
    Member
    Posted 5 years ago #

    I wonder about the same.

Topic Closed

This topic has been closed to new replies.

About this Topic