method 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 (שעון UTC).
[null,null,["עדכון אחרון: 2024-11-07 (שעון UTC)."],[[["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."]]],[]]