Active
Project:
Almanac
Version:
7.x-2.0
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
16 Mar 2011 at 16:42 UTC
Updated:
16 Mar 2011 at 19:05 UTC
Numbers are always formatted using a decimal point. For example: 93.2% and 9.9 dagen. The language selected by the user must be used to determine the correct decimal separator.
Comments
Comment #1
nhwebworker commentedThere will be an upcoming 2.x release that will improve translation issues.
Comment #2
j.stuyts commentedThanks, I am glad I can stop working on it. I wanted to create a patch, but with PHP <5.3 it is ridiculous how hard it is to format a number given the language code from Drupal:
nl_NL). Supplying just the language code tosetlocale(...)won't work. This means you have to convert the language code of Drupal to a locale name.setlocale(...)exhibits platform-specific behavior, so the locale name you have to pass in differs per platform.The class
NumberFormatterin PHP 5.3 fixes all these issues.