getLocales
Searching for all active objects of language localizations (available for use).
Locales?.getLocales();
Minimal example
const value = await Locales.getLocales()
This method retrieves all active language localization objects from the API. It returns a Promise that resolves to an array of LocaleEntity objects.
Example response
[
{
"id": 146,
"shortCode": "en",
"code": "en_US",
"name": "English (USA)",
"nativeName": "English (USA)",
"isActive": true,
"image": null,
"position": 1
},
{
"id": 48,
"shortCode": "ru",
"code": "ru_RU",
"name": "Russian",
"nativeName": "русский язык",
"isActive": true,
"image": null,
"position": 2
}
]
Schema
id: number
The unique identifier of the locales.
example: 1
shortCode: string
The shortCode of locales.
example: "en"
code: string
The full language code.
example: "en_US"
name: string
The language name.
example: "English"
nativeName: string
The native language name.
example: "English"
isActive: boolean
Active language flag.
example: true
image: string | null
The language image.
example: "https://example.com/images/en.png"
position: number
The language position.
example: 1