Expand description
Two-level i18n for Sova (root + page scopes).
Structs§
- AllJson
Enabled - Marker:
GET /_i18n/all.jsonis allowed. - I18n
- I18n plugin.
- I18n
Scope - Page scope attached via
I18nRouteExt::i18n_scope. - I18n
State - Shared runtime used by middleware and
I18nExt. - Locale
- Locale metadata exposed to the frontend.
- Locale
Code - Resolved locale code on the request.
- Resolve
Options - Scope
- One locale+scope snapshot.
- Store
- Immutable translation catalog.
Enums§
- Locale
Source - Sources checked in order (first match wins).
- Prefix
Mode - How to apply locale path prefixes.
Constants§
Traits§
- I18nExt
- Translate helpers on
Request. - I18n
Route Ext - Attach an i18n page scope to the last registered route.
Functions§
- default_
plural - Compatible with nuxt-i18n-micro
defaultPlural:forms[count]clamped. - get_
by_ path - JS
getByPath: exact top-level key first (hasOwnProperty), else dotted walk. - interpolate
- Replace
{token}placeholders; missing tokens stay as{token}. - load_
store - Load
locales/{lang}.jsonandlocales/pages/{page}/{lang}.json. - localize_
path - Build a localized path for
localefrom an unprefixedpath. - localized_
url - Absolute URL for a localized path.
- mount_
localized - Mount
routesunder locale prefixes ontoapp_router. - negotiate_
accept_ language - Parse
Accept-Languageand pick the best known locale. - resolve_
server_ locale - strip_
locale_ prefix - Strip a leading
/{locale}segment when it matches a known locale code. - template_
fn - Build a MiniJinja callable
t(...)for the current request.
Type Aliases§
- Plural
Fn - Split
one|two|manyand pick a form.