I set up a Gmail addon with an universalActions
menu.
The label should be defined by Session.getActiveUserLocale()
in any way.
Since variables are not allowed in the manifest file (appscript.json
) I have no idea how to do it.
I was looking around for solutions but it seems there are none. e.g. Localizing Google Add-ons
Since there does not seem to be a solution I removed the universalActions
completely from manifest file appsscript.json.
To get the menu in different languages I added it on each card.
return CardService.newCardBuilder()
.addCardAction(CardService.newCardAction()
.setText('test').setOnClickAction(CardService.newAction()
.setFunctionName('testfunction')))
.build();