Class Localizer
- Namespace
- XENBIT.ResQueServe.Core
- Assembly
- RQS.Core.dll
public static class Localizer
- Inheritance
-
Localizer
- Inherited Members
Properties
ServerLoc
Server texts, including the Frontend and simulation texts (see ConfigureOptions(LocalizerOptions)).
public static IStringLocalizer ServerLoc { get; set; }
Property Value
Methods
ConfigureOptions(LocalizerOptions)
Localizer options of all services (DI and the static localizers): resource folder, culture fallbacks and the type includes. The server renders texts of every type, so the Server types also resolve the Frontend and simulation texts; the Frontend types resolve only their own (they are what the frontend gets).
public static LocalizerOptions ConfigureOptions(LocalizerOptions options)
Parameters
optionsLocalizerOptions
Returns
- LocalizerOptions
GetDisplayDescription(Enum)
Retrieves the localized display description of an Enum value, if available. If not, returns the string representation of the Enum value.
public static string GetDisplayDescription(this Enum e)
Parameters
eEnum
Returns
- string
The localized display description of the Enum value, or its string representation if no description is available.
GetDisplayDescription(Enum, IStringLocalizer)
Like GetDisplayDescription(Enum), but only with the texts of localizer,
e.g. the Frontend localizer for the labels published in resqueserve-core.
public static string GetDisplayDescription(this Enum e, IStringLocalizer localizer)
Parameters
eEnumlocalizerIStringLocalizer
Returns
GetDisplayDescription(PropertyInfo)
public static string GetDisplayDescription(this PropertyInfo propertyInfo)
Parameters
propertyInfoPropertyInfo
Returns
GetDisplayDescription(Type, string)
Retrieves the localized display description of a property, if available. If not, returns the string representation of the property name.
public static string GetDisplayDescription(this Type type, string propertyName)
Parameters
Returns
- string
The display description of the property, or null if not found.
NormalizeKey(string)
Normalizes a single key segment to the UPPER_SNAKE_CASE format used in structured localization keys.
For example, AerialLadderTruck becomes AERIAL_LADDER_TRUCK.
public static string NormalizeKey(string value)
Parameters
valuestring