Localization

Localization

A DI-registered service that resolves all component chrome strings — placeholders, ARIA labels, button labels, empty states — without modifying library source.

Overview

Every string NeoUI components render as UI chrome — placeholders, button labels, ARIA attributes, empty states, pagination text — is resolved through a single DI-registered ILocalizer abstraction. The library ships with English defaults for all keys out of the box.

Library Chrome via ILocalizer

Strings owned by the library: placeholders, button labels, empty states, pagination text, ARIA labels, and screen-reader text.

Search...No results foundRows per pageNextAdd tag…Close

Culture-Aware Formatting automatic

Calendar month/day names, date display formats, and numeric separators follow CultureInfo.CurrentCulture automatically — no ILocalizer keys required.

"March" → "März"1,234.56 → 1.234,56

Live Language Preview

Select a language below to see component strings update in real time. Each option builds a DefaultLocalizer pre-populated with its translations, then passes strings as explicit parameters — the same technique you use in production.

Language:

Combobox

MultiSelect

TagInput

DatePicker

Pagination

Default Behavior

When no explicit string parameters are passed, components fall back to the injected ILocalizer. The library ships with English defaults for every component.

Combobox — no Placeholder/SearchPlaceholder/EmptyMessage parameters

TagInput — no Placeholder parameter

PaginationPrevious / PaginationNext — no Text parameter

Per-Instance Override

Pass an explicit string parameter to any component to override the localizer for that instance. All string parameters are nullable — existing code passing explicit strings continues to work unchanged.

German overrides via parameters (no global config needed)

Custom Pagination labels

Option A — Startup-Time Override

Configure the DefaultLocalizer at startup using the AddNeoUIComponents overload. All components using that key will render the customized string globally, with no component-level changes required.

// Program.cs — startup-time key overrides (Option A)
builder.Services.AddNeoUIComponents(localizer =>
{
    localizer.Set("Combobox.Placeholder",      "Wählen Sie eine Option...");
    localizer.Set("Combobox.SearchPlaceholder", "Suchen...");
    localizer.Set("Combobox.EmptyMessage",      "Keine Ergebnisse gefunden.");
    localizer.Set("DataTable.Loading",          "Laden...");
    localizer.Set("Pagination.Previous",        "Zurück");
    localizer.Set("Pagination.Next",            "Weiter");
});

Option B — Full IStringLocalizer<T> Integration

Subclass DefaultLocalizer to integrate with ASP.NET Core's IStringLocalizer<T> and .resx resource files. Only keys found in the resource file are substituted; the rest fall back to English defaults automatically.

// AppLocalizer.cs — full IStringLocalizer<T> integration (Option B)
public class AppLocalizer(IStringLocalizer<SharedResources> loc) : DefaultLocalizer
{
    public override string this[string key] =>
        loc[key] is { ResourceNotFound: false } found ? found.Value : base[key];

    public override string this[string key, params object[] arguments] =>
        loc[key, arguments] is { ResourceNotFound: false } found
            ? found.Value
            : base[key, arguments];
}

// Program.cs — register after AddNeoUIComponents() to override the default scoped registration
builder.Services.AddNeoUIComponents();
builder.Services.AddScoped<ILocalizer, AppLocalizer>();

DI Lifetime: Scoped vs Singleton

ILocalizer is registered as Scoped by AddNeoUIComponents() — each Blazor Server circuit and each WebAssembly session gets its own independent instance.

Scoped (default)

One instance per Blazor Server circuit or WebAssembly session. Required for Option B so each user's CultureInfo is resolved independently.

Singleton

One shared instance for the entire application lifetime. Safe for Option A (static startup keys) and avoids per-circuit allocation. Incompatible with per-user culture switching.

// Default: Scoped — one instance per circuit (Blazor Server) or session (WebAssembly).
// Required for Option B so each user's CultureInfo is resolved independently.
builder.Services.AddNeoUIComponents();
builder.Services.AddScoped<ILocalizer, AppLocalizer>(); // overrides the default Scoped registration

// Singleton — one shared instance for the entire app lifetime.
// Safe when all users share the same language (Option A or a fixed custom localizer).
// Must be registered AFTER AddNeoUIComponents() to override the default Scoped registration.
builder.Services.AddNeoUIComponents();
builder.Services.AddSingleton<ILocalizer>(_ =>
{
    var loc = new DefaultLocalizer();
    loc.Set("Combobox.Placeholder", "Wählen Sie eine Option...");
    loc.Set("Pagination.Previous",  "Zurück");
    loc.Set("Pagination.Next",      "Weiter");
    return loc;
});

Live Key Lookup

Try any localization key to see the resolved string from the currently active ILocalizer.

Key Reference

All built-in localization keys shipped with DefaultLocalizer and their English default values.

Key Default Value
Alert.Dismiss Dismiss
Breadcrumb.Breadcrumb breadcrumb
Breadcrumb.More More
Calendar.GoToPreviousMonth Go to previous month
Calendar.GoToNextMonth Go to next month
Calendar.AriaLabel Calendar
Calendar.SelectMonth Select month
Calendar.SelectYear Select year
Carousel.NextSlide Next slide
Carousel.PreviousSlide Previous slide
Carousel.GoToSlide Go to slide {0}
Combobox.Placeholder Select an option...
Combobox.SearchPlaceholder Search...
Combobox.EmptyMessage No results found.
Combobox.Selected Selected
Command.ListAriaLabel Command list
Command.MenuAriaLabel Command menu
DataGrid.Loading Loading...
DataGrid.NoResultsFound No results found
DataGrid.InitializingGrid Initializing grid...
DataTable.Loading Loading...
DataTable.NoResultsFound No results found
DataTable.Search Search...
DataTable.Columns Columns
DataTable.ToggleColumns Toggle columns
DataTable.Filter Filter
DataTable.FilterColumns Filter columns
DataTable.SelectRowsAriaLabel Select rows - click to see options
DataTable.SelectAllOnPage Select all on this page ({0} items)
DataTable.SelectAllItems Select all {0} items
DataTable.ClearSelection Clear selection
DataTable.SelectAllRows Select all rows
DataTable.SelectThisRow Select this row
DataView.SearchPlaceholder Search…
DataView.NoResultsFound No items to display.
DataView.Loading Loading…
DataView.LoadingMore Loading more…
DataView.LoadMore Load more
DataView.ListView List view
DataView.GridView Grid view
DataView.Sort Sort
DatePicker.Placeholder Pick a date
DateRangePicker.Placeholder Pick a date range
DateRangePicker.Apply Apply
DateRangePicker.Clear Clear
DateRangePicker.Today Today
DateRangePicker.Yesterday Yesterday
DateRangePicker.Last7Days Last 7 days
DateRangePicker.Last30Days Last 30 days
DateRangePicker.ThisMonth This month
DateRangePicker.LastMonth Last month
DateRangePicker.ThisYear This year
DateRangePicker.Custom Custom
DateRangePicker.DaysSelected {0} day(s) selected
DateRangePicker.SelectEndDate Select end date
DateRangePicker.QuickSelect Quick Select
Dialog.Close Close
FileUpload.Accepted Accepted: {0}
FileUpload.MaxSize Max size: {0}
FileUpload.MaxFiles Max files: {0}
FileUpload.FilesCount Files ({0})
FileUpload.RemoveFile Remove {0}
Filter.RemoveFilter Remove filter
Filter.Operator.Equals is
Filter.Operator.NotEquals is not
Filter.Operator.Contains contains
Filter.Operator.NotContains does not contain
Filter.Operator.StartsWith starts with
Filter.Operator.EndsWith ends with
Filter.Operator.IsEmpty is empty
Filter.Operator.IsNotEmpty is not empty
Filter.Operator.GreaterThan is greater than
Filter.Operator.LessThan is less than
Filter.Operator.GreaterThanOrEqual is ≥
Filter.Operator.LessThanOrEqual is ≤
Filter.Operator.Between is between
Filter.Operator.NotBetween is not between
Filter.Operator.IsAnyOf is any of
Filter.Operator.IsNoneOf is none of
Filter.Operator.IsAllOf is all of
Filter.Operator.IsTrue is true
Filter.Operator.IsFalse is false
MultiSelect.Placeholder Select items...
MultiSelect.SearchPlaceholder Search...
MultiSelect.EmptyMessage No results found.
MultiSelect.SelectAll Select All
MultiSelect.Clear Clear
MultiSelect.Close Close
MultiSelect.ClearAllAriaLabel Clear all
NumericInput.IncreaseValue Increase value
NumericInput.DecreaseValue Decrease value
Pagination.Previous Previous
Pagination.Next Next
Pagination.RowsPerPage Rows per page
Pagination.ShowingFormat Showing {0}–{1} of {2}
Pagination.PageFormat Page {0} of {1}
Pagination.NoItems No items
Pagination.GoToFirstPage Go to first page
Pagination.GoToLastPage Go to last page
Rating.Rating Rating
ResponsiveNav.ToggleMenu Toggle Menu
RichTextEditor.Normal Normal
RichTextEditor.Heading1 Heading 1
RichTextEditor.Heading2 Heading 2
RichTextEditor.Heading3 Heading 3
RichTextEditor.BoldTooltip Bold (Ctrl+B)
RichTextEditor.ItalicTooltip Italic (Ctrl+I)
RichTextEditor.UnderlineTooltip Underline (Ctrl+U)
RichTextEditor.StrikethroughTooltip Strikethrough
RichTextEditor.BulletListTooltip Bullet List
RichTextEditor.NumberedListTooltip Numbered List
RichTextEditor.InsertLinkTooltip Insert Link
RichTextEditor.BlockquoteTooltip Blockquote
RichTextEditor.CodeBlockTooltip Code Block
RichTextEditor.EditLinkTitle Edit Link
RichTextEditor.InsertLinkTitle Insert Link
RichTextEditor.UpdateLinkDescription Update the URL or remove the link.
RichTextEditor.InsertLinkDescription Enter the URL for the selected text.
RichTextEditor.UrlLabel URL
RichTextEditor.UrlPlaceholder https://example.com
RichTextEditor.RemoveLink Remove Link
RichTextEditor.Cancel Cancel
RichTextEditor.Update Update
RichTextEditor.Insert Insert
Sidebar.ToggleSidebar Toggle Sidebar
TagInput.Placeholder Add tag…
TagInput.RemoveTag Remove {0}
TagInput.ClearAllTags Clear all tags
TagInput.TagSuggestions Tag suggestions
ThemeSwitcher.ChangeTheme Change theme
ThemeSwitcher.Settings Theme Settings
ThemeSwitcher.BaseColor Base Color
ThemeSwitcher.ThemeColor Theme Color
Timeline.AriaLabel Timeline
Timeline.NoItems No timeline items.
Toast.Close Close

Reconnecting...

Attempting to rejoin the server

Connection Lost

Retrying in seconds

Connection Failed

Failed to rejoin the server.
Please retry or reload the page.

Session Paused

The session has been paused by the server

Resume Failed

Failed to resume the session.
Please reload the page.