Home > Mobile >  Gets the language setting of the current user always return 'en-US'
Gets the language setting of the current user always return 'en-US'

Time:09-17

I created a simple Google apps script function to get the language setting of the current user. The goal is to get the google sheets menu language.

I'm using the following Google app script:

function myFunction() {
  const systemInfo = Session.getActiveUserLocale();
  return systemInfo;
}

But whatever the language selected in the menu,

enter image description here

the function always returns 'EN-us' !!

CodePudding user response:

It is a known bug in the new editor. You can use the old (legacy) one until Google will fix it. Bug report

  • Related