Title: number_format() bug ?
Author: Xavier Borderie
Published: June 24, 2013

---

 [  ](https://profiles.wordpress.org/xibe/) [Xavier Borderie](https://profiles.wordpress.org/xibe/)
9:59 pm _on_ June 24, 2013     
Tags: [fr_FR ( 970 )](https://make.wordpress.org/polyglots/teams/?locale=fr_FR)

# number_format() bug ?

Hello everyone,

I’d like to share an issue we are having with the fr_FR translation for WP 3.5.2.

Typographically, the separator for thousands in French is a non-breaking space :
http://fr.wikipedia.org/wiki/Espace_%28typographie%29 (or http://french.about.com/
library/writing/bl-punctuation.htm).

Therefore, [the FR translation](http://svn.automattic.com/wordpress-i18n/fr_FR/branches/3.5/messages/fr_FR.po)
uses ” “:

`
 #. translators: $thousands_sep argument for http:php.net/number_format, default#.
is , #: wp-includes/locale.php:173 msgid "number_format_thousands_sep" msgstr " "

The issue is that wsince version 3.5.2 and it accompagnying translation (at least—
I have little access to my own computer equipment at the moment so cannot test further),
WordPres only picks the ‘&’ — rendering with 1&000 when we’d like 1 000.

Reports from [the French community](http://www.wordpress-fr.net/support/viewtopic.php?pid=427621#p427621)
seem to point to the a problem with the number_format() function’s multibyte support,
which would be able to recognize ” ” properly with PHPPHP PHP (recursive acronym
for PHP: Hypertext Preprocessor) is a widely-used open source general-purpose scripting
language that is especially suited for web development and can be embedded into 
HTML. [https://www.php.net/manual/en/index.php](https://www.php.net/manual/en/index.php)
5.4, but not with PHP 5.3.

The issue can quickly be corrected in the translation itself (removing the non-breaking
space for a simple space or even nothing at all so as to not have numbers everywhere),
but it would be great to be typographically correct, and therefore assert if this
is a bug or not. It seems it didn’t apply to 3.5.1 et al., but I cannot test for
sure from where I am.

Has anyone seen this in other languages? Typically, the Dashboard stats would display
numbers as 1&234 instead of 1234 or 1 234.

Nacin and other coreCore Core is the set of software required to run WordPress. 
The Core Development Team builds WordPress. devs hanging around, does a conflict
between number_format() and PHP 5.3/5.4 seem plausible to you?

Thank you very much.

[#fr_fr](https://make.wordpress.org/polyglots/teams/?locale=fr_FR)

### Share this:

 * [  Threads ](https://make.wordpress.org/polyglots/2013/06/24/number_format-bug/?share=threads)
 * [  Bluesky ](https://make.wordpress.org/polyglots/2013/06/24/number_format-bug/?share=bluesky)
 * [  Facebook ](https://make.wordpress.org/polyglots/2013/06/24/number_format-bug/?share=facebook)
 * [  X ](https://make.wordpress.org/polyglots/2013/06/24/number_format-bug/?share=x)
 * [  Mastodon ](https://make.wordpress.org/polyglots/2013/06/24/number_format-bug/?share=mastodon)
 * [  WhatsApp ](https://make.wordpress.org/polyglots/2013/06/24/number_format-bug/?share=jetpack-whatsapp)
 * [  LinkedIn ](https://make.wordpress.org/polyglots/2013/06/24/number_format-bug/?share=linkedin)

 * [Login to Reply](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fpolyglots%2F2013%2F06%2F24%2Fnumber_format-bug%2F%23respond&locale=en_US)

 * [To-do](https://make.wordpress.org/polyglots/2013/06/24/number_format-bug/?output_format=md#)

 1.  ![](https://secure.gravatar.com/avatar/2349fe153237a398b058cefe15910aff3acea2c67da2f8bb6ee587a3cdb31347?
     s=32&d=mm&r=g)
 2.   [Xavier Borderie](https://profiles.wordpress.org/xibe/)  10:01 pm _on_ June 24,
     2013
 3.  Ha! Of course the post would rending my & nbsp;’s as space! Sorry for this. I 
     hope my explanation is clear enough anyway.
 4.  ![](https://secure.gravatar.com/avatar/2349fe153237a398b058cefe15910aff3acea2c67da2f8bb6ee587a3cdb31347?
     s=32&d=mm&r=g)
 5.   [Xavier Borderie](https://profiles.wordpress.org/xibe/)  7:35 am _on_ June 25,
     2013
 6.  Ok, now that I access to my work machine, I can test, and turns out I can’t just
     translate this into nothing, as it is then replaced by the default value (in English,
     a comma). So for not, I have to use a space character, hoping that the numbers
     won’t break.
 7.  ![](https://secure.gravatar.com/avatar/2349fe153237a398b058cefe15910aff3acea2c67da2f8bb6ee587a3cdb31347?
     s=32&d=mm&r=g)
 8.   [Xavier Borderie](https://profiles.wordpress.org/xibe/)  11:56 am _on_ June 25,
     2013
 9.  The change log at [http://www.php.net/manual/en/function.number-format.php](http://www.php.net/manual/en/function.number-format.php)
     seems to confirm that.
      It would be nice to see WordPress’ number_format() function
     updated so as to be able to accept HTMLHTML HTML is an acronym for Hyper Text 
     Markup Language. It is a markup language that is used in the development of web
     pages and websites. entities — after all, the function exists for typographical
     correctness, and many language might need a non-breaking space rather than a dot
     or a comma.
 10.  * ![](https://secure.gravatar.com/avatar/fcfb66f478edda7cae23873523a6994855a9e8199737a8ebb02d0fa00fbd94ad?
        s=32&d=mm&r=g)
      *  [Peter Holme](https://profiles.wordpress.org/peterhol/)  10:07 am _on_ July
        1, 2013
      * +1 🙂
 11. ![](https://secure.gravatar.com/avatar/97b4fa6bf7377444cfeeee01a0339665e5f822b419c6ba5f0184bf57086e11b1?
     s=32&d=mm&r=g)
 12.  [Remco Tolsma](https://profiles.wordpress.org/remcotolsma/)  10:35 am _on_ July
     6, 2018
 13. It looks like this issue is still around, i just created a TracTrac Trac is the
     place where contributors create issues for bugs or feature requests much like 
     GitHub.[https://core.trac.wordpress.org/](https://core.trac.wordpress.org/). ticket
     for this: [https://core.trac.wordpress.org/ticket/44531](https://core.trac.wordpress.org/ticket/44531).
 14.  * ![](https://secure.gravatar.com/avatar/2349fe153237a398b058cefe15910aff3acea2c67da2f8bb6ee587a3cdb31347?
        s=32&d=mm&r=g)
      *  [Xavier Borderie](https://profiles.wordpress.org/xibe/)  11:42 am _on_ July
        6, 2018
      * Thank you Remco!
      * pingPing The act of sending a very small amount of data to an end point. Ping
        is used in computer science to illicit a response from a target server to test
        it’s connection. Ping is also a term used by Slack users to @ someone or send
        them a direct message (DM). Users might say something along the lines of “Ping
        me when the meeting starts.” [@fxbenard](https://profiles.wordpress.org/fxbenard/)
        [@audrasjb](https://profiles.wordpress.org/audrasjb/) [@wolforg](https://profiles.wordpress.org/wolforg/)&
        the rest of the active fr_FR team for proper testing and follow up 🙂
         - ![](https://secure.gravatar.com/avatar/546b52106b1666183da440e3f3d8b85f6e02554d4a1eb38c34364e32dbfa7f32?
           s=32&d=mm&r=g)
         -  [2dou](https://profiles.wordpress.org/2dou/)  7:29 am _on_ May 6, 2020
         - Hi [@Xavier](https://profiles.wordpress.org/xavier/) Borderie,
            I have suggested
           a translation for JS-JOBS pluginPlugin A plugin is a piece of software containing
           a group of functions that can be added to a WordPress website. They can 
           extend functionality or add new features to your WordPress websites. WordPress
           plugins are written in the PHP programming language and integrate seamlessly
           with WordPress. These can be free in the WordPress.org Plugin Directory 
           [https://wordpress.org/plugins/](https://wordpress.org/plugins/) or can 
           be cost-based plugin from a third-party.. I am seeking for someone to get
           a look in it. Thanks !

### Leave a Reply 󠀁[Cancel reply](https://make.wordpress.org/polyglots/2013/06/24/number_format-bug/?output_format=md#respond)󠁿

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fpolyglots%2F2013%2F06%2F24%2Fnumber_format-bug%2F&locale=en_US)
to post a comment.

# Post navigation

[← WordPress 3.5.2 has been released This is a…](https://make.wordpress.org/polyglots/2013/06/21/wordpress-3-5-2-has-been-released-this-is-a/)

[String Suggestion In the general settings there are… →](https://make.wordpress.org/polyglots/2013/06/24/string-suggestion-in-the-general-settings-there-are/)