Commit Graph

3 Commits

Author SHA1 Message Date
Atanas Korchev
609622692e Add culture-aware editing, display, and formula entry to RadzenSpreadsheet
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.
2026-07-08 14:54:55 +03:00
Vladimir Enchev
e5bd0343fa Add built-in German, French, Spanish, Italian and Japanese translations
Ship satellite resource files (RadzenStrings.{de,fr,es,it,ja}.resx) with all
535 strings translated, so components localize out of the box via the standard
.NET ResourceManager.

Make culture handling reactive everywhere:
- RadzenDatePicker rebuilds its month/year lists when Culture or the
  DefaultCulture cascade changes (previously cached at init).
- Scheduler views, HtmlEditor tools and the spreadsheet ChartOverlay localize
  through their parent component's UICulture instead of CurrentUICulture;
  spreadsheet dialogs honor a DefaultUICulture cascade. UICulture is added to
  IScheduler/ISpreadsheet as default interface members, so this is non-breaking.

Update the Localization demo with an interactive language switcher (cascading
DefaultUICulture + DefaultCulture) backed by an ILocalizer so it works in-place
on Blazor WebAssembly.
2026-06-15 18:45:19 +03:00
Atanas Korchev
b6dcb2f34c Introduce SpreadsheetDialogBase and localize remaining hardcoded strings
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(...).
2026-06-15 18:45:16 +03:00