Skip to main content

ILanguageManager

Allows the default error message translations to be managed.

Assembly: ServiceStack.dll
View Source
Declaration
public interface ILanguageManager

Properties

Enabled

Whether localization is enabled.

View Source
Declaration
bool Enabled { get; set; }

Culture

Default culture to use for all requests to the LanguageManager. If not specified, uses the current UI culture.

View Source
Declaration
CultureInfo Culture { get; set; }

Methods

GetString(String, CultureInfo)

Gets a translated string based on its key. If the culture is specific and it isn't registered, we try the neutral culture instead. If no matching culture is found to be registered we use English.

View Source
Declaration
string GetString(string key, CultureInfo culture = null)
Returns

System.String

Parameters
TypeNameDescription
System.StringkeyThe key

| | System.Globalization.CultureInfo | culture | The culture to translate into

|