3

I am trying to get the list separator property which is configured in windows regional settings. I have found the below code which is working for IE and Chrome but unfortunately not working in firefox.

function getLocaleDelimeter(){

    var array = ['a', 'b'];
    var list_seperator = array.toLocaleString().substring(1, 2);
    var delimiter = ";";
    if (list_seperator != null && list_seperator != "")
    {
        delimiter = list_seperator;
    }

    return delimiter;

}

Could anyone tell me how to get the list seperator in firefox ? Thanks.

rematnarab
  • 1,277
  • 4
  • 22
  • 42
  • Might be worth a look here: http://stackoverflow.com/questions/1011628/detecting-regional-settings-list-separator-from-web which might be a possible duplicate. Though I've no idea as to its compatibility in Firefox. The accepted answer is in JavaScript, despite the question's title specifying 'Ruby on Rails.' – David Thomas May 28 '12 at 13:12
  • Unfortunately that one is almost the same as mine and not working in Firefox. – rematnarab May 28 '12 at 14:07

0 Answers0