I wanted to parse a formatted number string accepting comma space, dot as thousand separator and comma and dot as decimal separator
examples Input = 1 2345,6 locale -swedish //output 12345.6
Input = 1.2345,6 -danish //output 12345.6 Input = 1,2345.6 - english //output 12345.6
OK, first we can write a parser to convert given number according to the locale;
then you can test it with converting the given number to specific locale again. sample code: