[]
        
(Showing Draft Content)

C1.WPF.Localization.C1Localizer.GetString

GetString Method

GetString(string, string, string, string, Assembly)

Returns the localized string for the specified culture.

Declaration
public static string GetString(string resourceAssembly, string resourceDictionary, string resourceKey, string defaultValue, Assembly currentAssembly = null)
Parameters
Type Name Description
string resourceAssembly

The name of executing assembly.

string resourceDictionary

The name of resource dictionary.

string resourceKey

The resource key.

string defaultValue

The default value.

Assembly currentAssembly

The current executing assembly.

Returns
Type Description
string
Remarks

Search order: - searching in the specified resource Assembly; - searching in satellite Assemblies of the specified resource Assembly; - searching in the executing assembly; - repeating the search in above assemblies for the parent culture; - if result is not found, returning the specified default value.

GetString(string, string, string, string, CultureInfo, Assembly)

Returns the localized string for the specified culture.

Declaration
public static string GetString(string resourceAssembly, string resourceDictionary, string resourceKey, string defaultValue, CultureInfo culture, Assembly currentAssembly = null)
Parameters
Type Name Description
string resourceAssembly

The name of resource assembly.

string resourceDictionary

The name of resource dictionary.

string resourceKey

The resource key.

string defaultValue

The default value.

CultureInfo culture

The CultureInfo info.

Assembly currentAssembly

The current executing assembly.

Returns
Type Description
string
Remarks

Search order: - searching in the specified resource Assembly; - searching in satellite Assemblies of the specified resource Assembly; - searching in the executing assembly; - repeating the search in above assemblies for the parent culture; - if result is not found, returning the specified default value.

GetString(string, string, string, Assembly)

Returns the localized string for the specified culture.

Declaration
public static string GetString(string resourceDictionary, string resourceKey, string defaultValue, Assembly currentAssembly = null)
Parameters
Type Name Description
string resourceDictionary

The name of resource dictionary.

string resourceKey

The resource key.

string defaultValue

The default value.

Assembly currentAssembly

The executing assembly.

Returns
Type Description
string
Remarks

Search order: - searching in the executing Assembly; - repeating the search for the parent culture; - if result is not found, returning the specified default value.

GetString(string, string, string, CultureInfo, Assembly)

Returns the localized string for the specified culture.

Declaration
public static string GetString(string resourceDictionary, string resourceKey, string defaultValue, CultureInfo culture, Assembly currentAssembly = null)
Parameters
Type Name Description
string resourceDictionary

The name of resource dictionary.

string resourceKey

The resource key.

string defaultValue

The default value.

CultureInfo culture

The CultureInfo object.

Assembly currentAssembly

The current executing assembly.

Returns
Type Description
string
Remarks

Search order: - searching in the executing Assembly; - repeating the search for the parent culture; - if result is not found, returning the specified default value.