Skip to main content

Module locale

Module locale 

Source
Expand description

Locale-aware formula entry: the separators and translated function names a locale’s users type, mapped onto the one canonical, locale-independent formula language before parsing (. decimal, , argument separator, English names, as formulas are stored).

de:  WENN(Preis > 1,5; RUNDEN(Preis; 2); 0)
 ⇒   IF(Preis > 1.5, ROUND(Preis, 2), 0)

The canonical spelling is always accepted too, so a formula written in the documentation works in every locale. Locale::localize goes the other way, to show a stored formula in the user’s spelling.

Translations come from LibreOffice’s (locale/<tag>.tsv, one CANONICAL<TAB>LOCAL row per function whose name differs).

Structs§

Locale
A formula locale.