I have a basic Google Sheets script and as part of the HTML sidebar I show the user the formula to type in; e.g. =myformula("bob", "ross")
. This works for people in the U.S. and a lot of other countries but there are quite a few countries that use ;
instead, so the formula looks like =myformula("bob"; "ross")
. I know I can probably get the locale of the spreadsheet via a script but is there a way to get whether I should put a ,
or a ;
? Thanks!
Asked
Active
Viewed 178 times
3

Rubén
- 34,714
- 9
- 70
- 166

user_87625129
- 89
- 5
-
2Let watch this https://youtu.be/ljvB2arCsNQ someone's already make the video for it, I hope it will be useful – zummon Apr 18 '20 at 01:34
1 Answers
5
;
is universally accepted(except in case of array literals). It'll automatically be parsed to ,
in the US and other locales.

TheMaster
- 45,448
- 6
- 62
- 85
-
Oh, I wish it was the other way around, sadly. Most of my users are in the U.S. and I don't want to confuse them by showing a `;` in the formula....thanks though – user_87625129 Apr 18 '20 at 14:41
-
1@user It won't show as `;` in sheet. When you set as `;`, it'll automatically be converted to `,` in sheet. – TheMaster Apr 18 '20 at 14:43
-
Ok, I'm thinking about what I show them to enter as I don't actually enter the formula for them – user_87625129 Apr 18 '20 at 14:49