Files
gridcraft/docs/formula-input.md
T
MaciekandMaciej Malinowski 80e5bf2857 formula: Polish formula language (FormulaLocale::Pl) (#1883)
* formula: Polish formula language (FormulaLocale::Pl)

- FormulaLocale::Pl: all 434 functions whose Polish Excel name differs, in
  crates/formula/src/input/pl.rs. Names come from PhpSpreadsheet's pl table
  (MIT) cross-checked with a second independent table; where they disagree
  or are missing, Microsoft's pl-pl pages decide, and the names #1678
  observed in Excel for the web fill the rest. Polish keeps MAX (only
  MAXIFS is MAKS.WARUNKÓW).
- PRAWDA/FAŁSZ, `;` argument and `\` array-column separators, decimal comma.
- Polish error values on entry and display (#DZIEL/0!, #N/D, #ARG!,
  #ROZLANIE!, #OBL!...); #N/D! and English spellings stay accepted.
- Table specifiers (#Wszystko, #Dane, #Nagłówki, #Sumy, #Ten wiersz) with
  ';' between bracketed parts.
- The locale tables are generalised (aliases()/boolean_names()) instead of
  hard-coding Spanish, and the parser keeps the locale instead of an `Es`
  flag; names are compared with the shared same_name, so `jeżeli` matches
  `JEŻELI` and a LET name `fałsz` is matched by `FAŁSZ`. Spanish behaviour
  is unchanged.
- Function help follows the interface language, as on main: Polish
  descriptions and argument names belong to the Polish catalog (#1807).
- Tests: crates/formula/tests/polish_input.rs and
  crates/calc/tests/polish_function_names.rs (every Polish name belongs to a
  known function and none shadows an English one).
- Docs: ROADMAP.md and docs/localization-parity.md.

The Polish interface language (on main since #1091) selects the locale:
Language::formula_locale maps Pl to it.

* formula: credit PhpSpreadsheet for the Polish function name table

The English-to-Polish name table in crates/formula/src/input/pl.rs comes
from PhpSpreadsheet's locale/pl/functions (MIT). ATTRIBUTION.md now lists
it in the same form as the CLDR region data, and NOTICE carries
PhpSpreadsheet's MIT licence text verbatim. The second table the names
were checked against was only a cross-check, and nothing was copied from
it; the module comment now says so.

---------

Co-authored-by: Maciej Malinowski <231036771+webglobecontact-ui@users.noreply.github.com>
2026-12-02 10:11:27 +01:00

2.7 KiB

Formula language

View → Interface language is the existing, persisted language preference. Choose Español for Spanish formula entry and display. On first run the preference follows the system language. English and the other interface languages currently use the English formula table and separators.

Spanish Canonical English
SUMA SUM
PROMEDIO AVERAGE
SI IF
CONTAR COUNT
SUMAR.SI SUMIF
CONTAR.SI COUNTIF
BUSCARV VLOOKUP
HOY TODAY
VERDADERO, FALSO TRUE, FALSE (literals or function calls)

Names are case-insensitive. Spanish formulas use decimal commas (1,5), semicolon arguments and reference unions, and backslashes between array columns ({1\2;3\4}). For example, =SI(VERDADERO;SUMA(1,5;2,25);0) evaluates to 3.75. English mode retains comma arguments, decimal points and comma array columns; it does not silently translate Spanish aliases.

Polish (FormulaLocale::Pl, selected by the Polish interface language) follows Polish Excel: 434 Polish function names (SUMA, JEŻELI, WYSZUKAJ.PIONOWO, X.WYSZUKAJ…; the other functions keep their English names there too, e.g. MAX, COS, LET), PRAWDA/FAŁSZ, the same separators as Spanish, Polish error values (#DZIEL/0!, #N/D, #ARG!, #ROZLANIE!…) and table specifiers with ; between parts (Tabela1[[#Nagłówki];[Kwota]]). English names and error values typed in Polish mode are accepted. Cell values (TRUE, #DIV/0! in the grid) are still shown in English, as in Spanish.

The cell editor, formula bar, Show Formulas, autocomplete, the Formula ribbon, Insert Function, and argument hints use the selected formula language. Common Spanish function help is translated; functions without a Spanish entry retain their English names/help. General interface labels and errors fall back to English where Spanish translations are not provided. An edit captures its language when it starts so switching the preference cannot reinterpret unfinished input.

Workbook/sheet names, table names, LET bindings and LAMBDA parameters take precedence over aliases. Text, sheet names and table column names are unchanged. When a localized spelling would collide with a name, displayed formulas retain the canonical spelling to preserve meaning.

Stored formulas, XLSX import/export, engine commands, control/API calls, CLI evaluation and clipboard exchange retain strict English syntax. This also applies to advanced dialogs such as Name Manager and conditional-format rules. Localization happens at the cell/formula-bar editor boundary, including filling the selected range with Ctrl+Enter; it does not change the workbook format or teach the calculation engine ambiguous aliases.