Localization & state persistence
Localization (i18n)
All UI strings are translatable. English is the default; nothing is hardcoded.
Livewire (Laravel translations)
Strings flow through __('elyra-datagrid::grid.*'). Ship your own translations by
publishing the language files and setting the app locale:
php artisan vendor:publish --tag=elyra-datagrid-lang
lang/vendor/elyra-datagrid/nb/grid.php
The package includes en (default). Operator labels live under
grid.operators.*.
Svelte / Vue (messages)
Pass a messages object (partial — anything omitted falls back to English):
import { DataGrid } from '@elyra/datagrid-vue';
const messages = {
search: 'Søk…',
itemsPerPage: 'per side',
of: 'av',
operators: { contains: 'inneholder', eq: 'er lik' /* ... */ },
};
<DataGrid :options="options" :messages="messages" />
Full key list: search, new, excel, clearFilters, clearGrouping, loading, facets, noRows, rows, selected, itemsPerPage, of, all, total, editRow, newRow, save, cancel, apply, clear, value, valueFrom, valueTo, groupHint, sortAsc, sortDesc, groupBy, freeze, unfreeze, hide, moveLeft, moveRight, columns, operators.
Number formatting
The clients format numbers with en-US by default (1,234.56). Provide a
format function per column, or a cell template with locale-appropriate
symbol/decimals, to localize.
State persistence
Persist column order/width/visibility/frozen, sort, filters, grouping, collapsed groups, page size, and pinned rows.
Svelte / Vue (localStorage)
Set a persistKey; the grid saves state to localStorage and restores it on
load:
const options = { /* ... */ persistKey: 'sales-grid' };
State is saved (debounced) on change and merged into the initial state on creation.
Livewire
Grid state lives in the component. Common bits (sort, q, page) are already
#[Url] so they survive refresh and are shareable. For fuller persistence, apply
Livewire's #[Session]/#[Url] to the relevant public properties, or persist
them yourself in dehydrate()/mount().