- Prepare a copy of the code in the localized-message.js, setting
MESSAGES
to suit your needs. - To call a message,
// Get user locale
var locale = Session.getActiveUserLocale();
or alternatively, if you are creating a script bound to a Google Docs file (e.g., a Google Sheets file),
var locale = SpreadsheetApp.getActiveSpreadsheet().getSpreadsheetLocale();