Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
base system
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 May 2009 at 18:25 UTC
Updated:
29 Jul 2014 at 18:17 UTC
I found this when reviewing xmlsitemap module that could make use of this function. The discussion is in #470778: Constant floating numbers shown in the user interface must be translatable. The core API documentation at http://api.drupal.org/api/group/format/6 tells us there are functions to format numbers, strings, dates, etc., but this is partly wrong. There is currently no function that formats numbers with international rules.
In German and many other countries in the EU floating point numbers do not have a dot (0.3). They use a comma (0,3). We should implement this for i18n.
Comments
Comment #1
hass commentedComment #2
hass commentedComment #3
dave reidMy best guess is we'll need to add something similar to locale_get_plural (used in format_plural).
Comment #4
dave reidAlso see http://drupal.org/project/format_number
Comment #5
sun.core commentedComment #6
markus_petrux commentedIsn't this issue a dup of #52153: Add Number::format with settings to configure decimal point and thousands separators ?
Comment #7
dave reidYes this is.