Formatting numbers in D7 I have a serialized object in a field. I now need to output a float-value. Since the site has 2 languages (german/english) I now need to format the float-number based on the current language.

$value = 123456789.01;
// Language = english
print the_format_function($value); # =&gt; 123456789.01

// Lanuage = german
print the_format_function($value); # =&gt; 123.345.789,01


I'm lookin for the_format_funtion();.
There is a format_number API module, which may eventually handle this for you. And possibly will make it into D8.

For the moment I think the function you are looking for is number_format()