Description
This function retrieves a locale's number formatting method.
Warning:
We strongly recommend that you use UAPI instead of cPanel API 2. However, no equivalent UAPI function exists.
Examples
{
"cpanelresult": {
"apiversion": 2,
"func": "numf",
"data": [
{
"numf": "1,234"
}
],
"event": {
"result": 1
},
"module": "Locale"
}
}
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible value |
|
number |
integer |
Required The number to display in the locale's style. |
Any numeric value. |
1000.234 |
max_decimal_places |
integer |
The number of decimal places to display. This parameter defaults to 6. |
Any integer value. |
3 |
Returns
Return |
Type |
Description |
Possible values |
Example |
numf |
integer |
The number, formatted in the user's locale's style. |
Any numeric value. |
1,234 |
reason |
string |
A reason for failure. Note:
This function only returns a reason value if there was an error.
|
A string that describes the error. |
This is an error message. |
result |
boolean |
Whether the function succeeded.
|
|
1 |