The spreadsheet engine parsed typed input with the invariant culture while
displaying values with the current culture, breaking the edit round-trip on
non-en-US hosts and making comma-decimal entry (10,50) impossible.
Workbook gains a Culture property (defaults to CurrentCulture) which the
component stamps from its inherited Culture parameter. It drives:
- Cell input parsing (CellData type inference), including day-month date
handling for cultures where the group and date separators collide (de-DE)
- Edit text and display rendering (GetValue, GetValueAsString, GetDisplayText)
- Number format rendering - format codes stay canonical invariant tokens while
separators, month names, and AM/PM designators follow the culture
- Formula entry and display via the new FormulaLocalizer (Excel FormulaLocal
semantics: ';' argument separators and ',' decimals in comma-decimal
cultures, lenient comma acceptance where unambiguous, canonical invariant
storage)
- Dialog input (data validation, conditional format, filter) via shared
conversion helpers on SpreadsheetDialogBase
XLSX and CSV files read and write canonical invariant values regardless of
the workbook culture, including autofit column widths. Malformed formulas now
surface as error trees instead of an unhandled lexer exception. Number format
parsing is cached (hard-bounded) since CellView reparsed per render.
Includes localization demos for the Spreadsheet and Document Processing
sections and culture test suites.
Note: headless code on non-en-US hosts now parses string values with the
host culture; set Workbook.Culture explicitly (or to InvariantCulture) for
host-independent processing.
Every spreadsheet dialog re-injected DialogService and Localizer,
re-defined the L(key) helper, and re-implemented OnCancel. Extract
SpreadsheetDialogBase covering this boilerplate.
EditChartDialog and CustomSortDialog had hardcoded English chart-type
names, legend positions, series-name format, and column-name format
while the rest of the same files used L(...). Localize via new
RadzenStrings entries (Spreadsheet_ChartType_*, Spreadsheet_LegendPosition_*,
Spreadsheet_SeriesFormat) and reuse the existing Spreadsheet_ColumnFormat.
EditChartDialog's static readonly chart-type/legend-position lists
become instance fields built in OnInitialized since they now call L(...).
Introduce a generic localization infrastructure that ships built-in English
defaults via .resx and allows user overrides through a public ILocalizer
interface. The service is designed to work across all Radzen components.
- Add ILocalizer interface for custom translation overrides
- Add internal Localizer class with fallback chain: custom → .resx → key
- Add RadzenStrings.resx with ~120 spreadsheet string keys
- Add UICulture/DefaultUICulture cascading parameter to RadzenComponent
- Add ISpreadsheet.Localize() for sub-component access
- Replace all hardcoded strings in spreadsheet tools, dialogs, and menus
- Register Localizer in AddRadzenComponents() with graceful fallback
- Works with zero configuration; user overrides are optional
Replaced all == null with is null and != null with is not null
across 109 spreadsheet files. The is null pattern uses a direct
reference check that cannot be overridden by operator overloads.
137 document-layer files now use namespace Radzen.Documents.Spreadsheet.
26 UI-layer files keep Radzen.Blazor.Spreadsheet with using added.
Test files add using Radzen.Documents.Spreadsheet.
Sheet class renamed to Worksheet to match industry conventions.
- Scientific format engine: tokenize E+00/E-00 patterns, FormatScientific
method with mantissa/exponent calculation, AdjustDecimals support
- Accounting format tokens: underscore (space), asterisk (fill skip),
question mark (space-padded digit placeholder)
- New NumberFormatCategory values: Accounting and Scientific
- Category detection in GetCategory and presets in GetPresets
- numFmtId 44 mapping for accounting format
- Toolbar dropdown updated with Accounting and Scientific entries
- FormatCodeBuilder: static helper to build format codes from UI state
- FormatCellsDialog: category list, live preview, decimal/symbol/separator
controls, date/time preset lists, custom format code input
- Format Cells button in Format tab with OnFormatCellsAsync handler
- 40 new tests: scientific/accounting format, presets, round-trip, dialog