JCalc > Tutorial > Set the culture

The following example shows you how to set the locale used for text conversion. It controls how TEXT, DOLLAR, FIXED, VALUE, DATEVALUE and the & operator convert between numbers and text. The default is the invariant locale, which matches the en-US behaviour of Excel. Formulas themselves always use invariant syntax.

As in Excel, the format text of TEXT is read in the conventions of the locale: with a non-English locale the decimal and group separators and the localized date letters are translated (German #.##0,00 and TT.MM.JJJJ, French # ##0,00 and jj/mm/aaaa), while the default locale and English locales read the English codes. Text that is converted to a date or time (VALUE, DATEVALUE, arithmetic on text) is recognized by one fixed set of patterns built from the locale's date order, date separator, month names and AM/PM designators.

Need help? Ask our developers: