Summary
Converts an array to a locale string.
Description
Returns a string representing the elements of the array.
Route
No Northbound API Available
Roles
Parameters
DetailsExampleSchema
Name |
Type |
Required |
Description |
arr |
array |
yes |
The array to convert |
locales |
array |
yes |
A string with a BCP 47 language tag, or an array of such strings |
options |
object |
yes |
An object with configuration properties, for numbers see Number.prototype.toLocaleString(), and for dates see Date.prototype.toLocaleString() |
Copied to Clipboard
{
"arr": [],
"locales": [
"en"
],
"options": {
"style": "currency",
"currency": "EUR"
}
}
Copied to Clipboard
{
"type": "object",
"properties": {
"arr": {
"title": "arr",
"type": "array",
"items": [
{
"type": [
"string",
"number",
"integer",
"object",
"array",
"boolean",
"null"
]
}
]
},
"locales": {
"title": "locales",
"type": "array",
"items": {
"type": "string"
},
"examples": [
[
"en"
]
]
},
"options": {
"title": "options",
"type": "object",
"properties": {
"style": {
"type": "string",
"enum": [
"currency",
"decimal",
"percent"
],
"examples": [
"currency"
]
},
"currency": {
"type": "string",
"examples": [
"USD",
"EUR"
]
}
}
}
},
"required": [
"arr",
"locales",
"options"
],
"additionalProperties": false
}
Return
DetailsExampleSchema
Name |
Type |
Description |
elementString |
string |
A string representing the elements of the array |
Copied to Clipboard
"1,a,12/21/1997, 2:12:00 PM"
Copied to Clipboard
{
"title": "elementString",
"type": "string",
"examples": [
"1,a,12/21/1997, 2:12:00 PM"
]
}