Skip to content

JsonLocalTextRegistration class

namespace: Serenity.Localization   assemblySerenity.Net.Core

Contains helper methods for registration of local texts in hierarchical or dictionary formatted JSON files.

public static class JsonLocalTextRegistration

Public Members

name description
static AddFromNestedDictionary(…) Adds translations from a hierarchical local text dictionary parsed from a JSON file.
static AddJsonResourceTexts(…) Adds JSON texts from embedded resources. (2 methods)
static AddJsonTexts(…) Adds translations from JSON files at the specified path. File names in this directory should be in the format ..json where is a language code like 'en', 'en-GB', etc.
static ParseLanguageIdFromPath(…) Parses the language ID from the file path.
static ProcessNestedDictionary<TValue>(…) Converts translations from a hierarchical local text dictionary to a simple dictionary.

See Also