Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Google Apps Script locale?

I created a Google Apps Script on the Google account, which had the Polish language set in the settings. Executing the script was causing some Google error message about exceeding quote Gmail rateMax, which was displayed in Polish.

I shared this script with another account, where language was set to English in account settings. To my surprise, executing the script on the account where language was set to English, caused the error message to still appear in Polish.

Question: how can I change the 'locale' of the Google Apps Script? Is it even possible?

Or is the only option to create new script on the account with English locale, and copy over the code?

like image 324
Michal Sz. Avatar asked Jan 30 '14 20:01

Michal Sz.


People also ask

How do I change the timezone in Google App script?

New scripts default to the owner's time zone, but the script's time zone can be changed by clicking File > Project properties in the script editor. Note that spreadsheets have a separate time zone, which can be changed by clicking File > Spreadsheet settings in Google Sheets.

Where is Google App script stored?

Google Apps Script projects are now included in the docs list in Google Drive. - Your projects are now stored in Google Drive and can be shared just like any other file.


1 Answers

If you created the script from within a spreadsheet -- by selecting Tools --> Script Editor within the Sheets UI, then executing setSpreadsheetLocale() on the spreadsheet should apply your locale setting to the script, too.

If you created the script as a new document from Drive, then your suspicion appears to be correct -- there is no user-visible locale setting for a Script Document, so you'll have to create the script with an English-locale account.

You can refer to the official documentation for more info.

like image 91
Jesse Scherer Avatar answered Sep 18 '22 13:09

Jesse Scherer