This project has moved and is read-only. For the latest updates, please go here.

Culture independent parsing

Sep 19, 2011 at 8:20 AM


is it possible create culture independent grammar for parsing floating point numbers and datetime values?

For example:

English date '3/21/2011' has equivalent '21.3.2011' in german / czech language

I would like allow users write those types with their native CultureUI settings.


Martin D.

Sep 19, 2011 at 8:26 AM

If you want to define dates as quoted strings - with quotes or for ex like #09/19/2011#), then it should be simple. Define dates as QuotedValueLiteral, dataType = string; then handle ValidateToken event; this is the chance to set the value of the token, instead of string - convert value according to UI culture and put it into token.Value.