Yöntem PickerBuilder.setLocale
Seçicinin yerel ayarını belirleyin. Yerel ayar, ISO 639 dil kodudur. Dil desteklenmiyorsa en-US kullanılır.
Örnekler
Temel kullanım
const builder = new google.pickerPickerBuilder()
.setLocale('ES_419');
Yerel ayarı gezgin dillerinden belirleyin
const builder = new google.pickerPickerBuilder()
.setLocale(navigator.languages[0]);
Daha fazla bilgi için Navigator.languages konusuna bakın.
İmza
setLocale(locale: Locales): PickerBuilder;
Ayrıntılar
İsteğe bağlı |
Hayır |
Final |
Hayır |
Korumalı |
Hayır |
Statik |
Hayır |
Parametreler
Ad |
Tür |
İsteğe bağlı |
Açıklama |
locale |
Locales |
Hayır |
|
İadeler
PickerBuilder
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2024-11-07 UTC.
[null,null,["Son güncelleme tarihi: 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."]]],[]]