Class
JsonLocalizerProvider
class JsonLocalizerProvider
Module: Neo.Localization
Assembly: Neo.Localization.dll
Source file: JsonLocalizerProvider.rvn
Inheritance: Object → JsonLocalizerProvider
Loads one explicit catalogue in the flat JSON string-map format. Each key and value must be a string. Dots are literal; no pluralization or interpolation is performed. Limits: 65536 UTF-8 bytes and 4096 entries. Duplicate ordinal keys are errors.
Constructors
2 items
JsonLocalizerProvider(directory: string, fallbackToInvariant: bool)
Configures the directory and automatic invariant fallback. Construction performs no I/O. Explicit Culture.Invariant selection always reads the invariant catalogue.
JsonLocalizerProvider(directory: string)
Configures an explicit resource directory, with invariant fallback enabled.
Methods
12 items
Static member:
Create(json: string) -> Result<Localizer, LocalizationError>
Creates a catalogue from JSON text without encoding it into a temporary byte array.
Static member:
Create(utf8: ReadOnlySlice<byte>) -> Result<Localizer, LocalizationError>
Creates an owned, immutable catalogue from a borrowed complete UTF-8 document. The input is not retained; parsing allocates stored keys, values and the lookup map.
Equals(other: object?) -> bool
Tests reference identity by default; an ordinary class may override equality.
Inherited from Object.Equals
GetHashCode() -> int
Returns a stable identity hash by default; an ordinary class may override it consistently with equality.
Inherited from Object.GetHashCode
GetType() -> TypeInfo
Returns metadata for the concrete runtime type of this instance.
Inherited from Object.GetType
Load(culture: Culture, resourceType: TypeInfo) -> Result<Localizer, LocalizationError>
Loads resources for a nominal runtime type using the same simple-name scope as the generic Load overload.
Load(culture: Culture, scope: string) -> Result<Localizer, LocalizationError>
Loads scope.culture.json, scope.language.json and scope.json, with per-key fallback. An empty scope uses culture.json, language.json and invariant.json instead. Invariant selects o…
Load(culture: Culture) -> Result<Localizer, LocalizationError>
Loads unscoped culture, language and invariant catalogues from an explicit directory. Fallback is per key. Missing files are skipped; all other failures are returned.
Load<T>(culture: Culture) -> Result<Localizer<T>, LocalizationError>
Loads using T's simple type name as the optional resource scope, retaining typed catalogue identity. Types with the same simple name share a scope; use explicit scope loading to av…
Static member:
Load(path: string) -> Result<Localizer, LocalizationError>
Reads one explicit UTF-8 file synchronously using the bounded blocking storage provider. The provider closes the file before returning. No ambient culture, path inference or cachin…
Static member:
Read(input: InputStream) -> Task<Result<Localizer, LocalizationError>>
Reads a UTF-8 catalogue from the current stream position through EOF; leaves the stream open. Loading buffers at most 65536 UTF-8 bytes. The resulting catalogue does not retain the…
ToString() -> string
Returns the concrete runtime type name for supported references, or display text from a class or boxed-struct override.
Inherited from Object.ToString