I'm using Session.getActiveUserLocale() to get the user's locale in a Google Calendar Workspace add-on (runtimeVersion: V8) and it works perfectly for every language I've tested - except for Chinese (both simplified and traditional).
function onCalendarHomePageOpen(e) {
Logger.log("Language Code: " + Session.getActiveUserLocale());
}
Should return "zh-CN" when my language is set to Simplified Chinese at https://myaccount.google.com/language, but it returns an empty string.
I know I could use e.commonEventObject.userLocale
, but need the locale in lots of places, and would rather not pass it around if possible.
I have the scope https://www.googleapis.com/auth/script.locale
and addOns.common.useLocaleFromApp
is true
, and as I mentioned it works as expected for every other language I've tried including Japanese and Arabic.
Is this a known issue? Can anyone help? Thanks!