الطريقة PickerBuilder.setLocale
اضبط لغة أداة الاختيار. اللغة هي رمز لغة وفقًا لمعيار ISO 639. إذا كانت اللغة غير متاحة، يتم استخدام en-US.
أمثلة
الاستخدام الأساسي
const builder = new google.pickerPickerBuilder()
.setLocale('ES_419');
ضبط اللغة من لغات أداة التنقّل
const builder = new google.pickerPickerBuilder()
.setLocale(navigator.languages[0]);
اطّلِع على Navigator.languages للحصول على مزيد من المعلومات.
التوقيع
setLocale(locale: Locales): PickerBuilder;
التفاصيل
اختياري |
لا |
النهائي |
لا |
الحماية |
لا |
ثابت |
لا |
المعلمات
الاسم |
النوع |
اختياري |
الوصف |
locale |
Locales |
لا |
|
المرتجعات
PickerBuilder
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-11-07 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-11-07 (حسب التوقيت العالمي المتفَّق عليه)"],[[["The `setLocale` method configures the language for the Google Picker using an ISO 639 language code, defaulting to en-US if the specified language isn't supported."],["Developers can utilize the `navigator.languages` property to dynamically set the locale based on the user's browser preferences."],["The method accepts a single parameter, `locale`, which should be a valid locale identifier as defined in the Locales documentation."],["Calling `setLocale` returns the `PickerBuilder` instance, enabling method chaining for further configuration."]]],[]]