getLocales
الحصول على جميع اللغات النشطة.
الوصف
يجلب اللغات النشطة في المشروع ويُعيد مصفوفة من كائنات ILocalEntity.
.getLocales();
أمثلة
مثال بسيط
const response = await Locales.getLocales();
مثال على الاستجابة
[
{
"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
}
]
مخطط الاستجابة
المخطط: ILocalEntity[]
id: number
معرّف اللغة.
مثال: 1
shortCode: string
رمز اللغة المختصر، مثل "en".
مثال: "en"
code: string
رمز اللغة الكامل، مثل en_US.
مثال: "en_US"
name: string
اسم اللغة.
مثال: "English"
nativeName: string
اسم اللغة بتلك اللغة نفسها.
مثال: "English"
isActive: boolean
هل اللغة نشطة.
مثال: true
image: string | null
الصورة المرتبطة باللغة.
مثال: "https://example.com/images/en.png"
position: number
موضع اللغة في القائمة.
مثال: 1