WordPress.org

Ready to get started?Download WordPress

Forums

How to internationalize number format (2 posts)

  1. viwiv
    Member
    Posted 5 years ago #

    Hi everybody!

    In my own theme, I want to internationalise number format like this:
    if (0 < $numtags) $numtags = number_format($numtags)

    For French (see: http://fr2.php.net/number_format), I write:
    if (0 < $numtags) $numtags = number_format($numtags , 0, ',', ' ');

    But how to internationalize this string for other languages and translate with PoEdit?

    Thanks.

    V.

  2. viwiv
    Member
    Posted 5 years ago #

    Ok! Resolved!

    ... With replace...

    if (0 < $numtags) $numtags = number_format($numtags , 0, ',', ' ');

    by...

    if (0 < $numtags) $numcats= number_format_i18n($numtags);

    Great!

    V.

Topic Closed

This topic has been closed to new replies.

About this Topic