קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
תוספים של Google Workspace יכולים לגשת לאזור ולשעון של המשתמש, ולהשתמש במידע הזה כדי להתאים אישית את הממשק וההתנהגות שלהם. עליכם להגדיר את מניפסט של התוסף כדי לאפשר לו לגשת למידע הזה.
הגדרת המניפסט של התוסף
כדי להגדיר את התוסף כך שיקבל גישה למידע על אזור הזמן ולשפה של המשתמש:
בקובץ manifest של התוסף, מגדירים את השדה addOns.common.useLocaleFromApp לערך true.
אם הוא לא מופיע, מוסיפים את ההיקף הבא ברשימה oauthScopes של המניפסט:
https://www.googleapis.com/auth/script.locale
אם הוספתם היקף לרשימת oauthScope של התוסף, המשתמשים יצטרכו להעניק הרשאה מחדש לתוסף בפעם הבאה שיפתחו אותו.
אובייקטים של אירועים מועברים לפונקציות קריאה חוזרת (callback) של פעולות כשהמשתמש יוצר אינטראקציה עם התוסף, ולפונקציות של דף הבית ושל טריגרים לפי הקשר. כל פונקציית קריאה חוזרת או פונקציית טריגר יכולה לקרוא את המידע על אזור הזמן והשפה מאובייקט האירוע ולהשתמש בו לפי הצורך.
לדוגמה, פונקציית קריאה חוזרת (callback) שמבצעת ניווט לכרטיס חדש יכולה להפנות למחרוזת האזור (locale) כשהיא מחליטה איזה טקסט להוסיף לכרטיס.
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 2024-12-22 (שעון UTC)."],[[["Google Workspace add-ons can be configured to access and utilize a user's locale and timezone for customization."],["Add-on developers must set `addOns.common.useLocaleFromApp` to `true` and include the `https://www.googleapis.com/auth/script.locale` scope in the manifest file for locale and timezone access."],["Event objects provide the user's locale and timezone information through fields like `userLocale`, `timeZone.offset`, and `timeZone.id`, which add-ons can utilize in their functions."],["After adding the necessary scope, users need to re-authorize the add-on for the changes to take effect."],["Add-ons should only request necessary scopes and consider removing unused ones, especially those previously used for locale and timezone access through other APIs or services."]]],["Google Workspace add-ons can access user locale and timezone by configuring the add-on manifest. Set `addOns.common.useLocaleFromApp` to `true` and add `https://www.googleapis.com/auth/script.locale` to `oauthScopes`. This requires users to re-authorize the add-on. Event objects contain `userLocale`, `timeZone.offset`, and `timeZone.id`. Callback functions and trigger functions read this information from the event object to customize the add-on's interface and behavior, such as text on cards.\n"]]