Localisation

Menus, dialogs, placeholders, validation messages and screen-reader sentences are properties you can replace. Cultures for formatting and for sorting are settings of their own. Both can differ from grid to grid in one window.

The default is German

The built-in texts ship in German, and that does not depend on the machine's culture: an announcement or a menu must not change with the computer it happens to run on. An English application switches once, at start-up:

English for the whole application
// Once, at start-up, before the first grid is created:
ArionUiText.UseEnglishTexts();      // menus, dialogs, validation and screen-reader sentences

// The Pro modules keep their own catalogues:
GroupingUiText.English();
PivotUiText.English();
ChartUiText.English();
FormattingUiText.English();
Scene3DUiText.English();

UseEnglishTexts() covers the engine's catalogue, accessibility sentences included. The Pro modules keep their own catalogues and each has an English() call; without them, the group band hint, the pivot field list, the chart menu entries, the formatting dialogs and the 3D camera menu stay German. UseGermanTexts() and German() switch back.

Replacing single strings

ArionUiText is a static facade with one property per text; texts that contain numbers or names are delegates. A third language means setting the members by hand.

Single texts
ArionUiText.NoResults = "Nothing found";
ArionUiText.SortAscending = "Sort A to Z";
ArionUiText.SearchCounter = (current, total) => $"{current} / {total}";

A few labels are parameters rather than texts: the grand-total label of a pivot is passed when the spec is built, and its default is German too.

A pivot's grand total
PivotSpec spec = fields.BuildSpec(grandTotalLabel: "Total");   // the default label is "Gesamt"

One text is not in the catalogue: the title of the drawn empty state is a property of each grid and starts as "Keine Ergebnisse", whatever language is set. An English application sets EmptyStateTitle on the control, or Api.State.EmptyStateTitle, for every grid.

Per grid: GridContext

Texts, icons and both cultures belong to a grid, not to the process. ArionUiText reads and writes GridContext.Default, which every grid without a context of its own uses. Give a grid its own context and it speaks its own language:

Two languages in one window
var english = new GridContext
{
    Culture = CultureInfo.GetCultureInfo("en-GB"),       // numbers and dates: display, editing, filters
    SortCulture = CultureInfo.GetCultureInfo("en-GB"),   // text order: sorting, grouping, value lists
};
english.Texts.UseEnglishTexts();
english.Get<GroupingTexts>().English();                  // a Pro module's texts, for this grid only

englishGrid.Context = english;                           // the other grid keeps GridContext.Default

Culture formats and parses numbers and dates — cell text, editors, filters, the calendar, chart axes; null means the thread's current culture. SortCulture orders text when sorting, grouping and listing filter values; null means SortFilterSource.SortCulture. Both are fixed when the context is created. Context is a bindable property on the controls and is also Api.State.Context.

Columns with a culture of their own

The typed factories take a format and an optional culture. A column with its own culture keeps it whatever the grid's culture is — useful for a currency column in a foreign-currency report.

Format and culture per column
TypedColumn.Number<Order>("Amount", o => (double)o.Amount, format: "N2",
                          culture: CultureInfo.GetCultureInfo("de-CH"));
TypedColumn.Date<Order>("Booked", o => o.Booked, format: "yyyy-MM-dd");

The default date format of TypedColumn.Date is dd.MM.yyyy. Pass the format your users expect.

Right-to-left

Bidirectional text inside a cell is laid out correctly — Arabic and Hebrew runs, mixed with Latin, with the caret where the glyphs are. The grid's own layout is always left to right: columns, scroll bars and chrome are not mirrored. That is listed on What it does not do yet.