WordPress.org

Support

Support » Plugins and Hacks » qTranslate » qTranslate: How to translate Dates?

qTranslate: How to translate Dates?

  • I wanna display a date in a language dependant format. So I wrapped the the format string in an __() function

    <?php  echo strftime( __("%B %d, %Y"), strtotime($post->post_date) );?>

    and added a translation in the po/mo file.

    msgid "%B %d, %Y"
    msgstr "%d. %B %Y"

    But it always uses the “%B %d, %Y”-Format, never “%d. %B %Y”`.

    How can I translate dates?

    https://wordpress.org/plugins/qtranslate/

Viewing 1 replies (of 1 total)
  • Hello,

    The example you wrote about should work. Maybe you just need to use some textdomain? (It depends on which po/mo files you modified, if these were a template files, you should call __("%B %d, %Y", 'template-textdomain-name'))

Viewing 1 replies (of 1 total)
  • The topic ‘qTranslate: How to translate Dates?’ is closed to new replies.
Skip to toolbar