Calling this function we can apply a specific locale (combination of a language, a country and possible few more values) on our program. The first argument should be a constant that specifies on what do we want to apply the new locale (e.g. LC_NUMERIC will apply our locale on the decimal separator). The second argument is a string composed of two small letters that represent a specific language, two capital letters that represent a specific country and few more possible values.
<?php setlocale(LC_NUMERIC,"he_IL"); $sum = 1249293.24; printf("sum is %f",$sum); ?>
The following short video clip shows the execution of this code sample and explains it.