Class ResHelper
Provides methods to provide localized resource strings
public static class ResHelper
- Inheritance
-
objectResHelper
Properties
Dash
Dash symbol.
[Obsolete("Property was not intended for public use and will be removed.")]
[ObsoleteSince(29, 6)]
public static string Dash { get; }
Property Value
- string
Slash
Slash symbol.
[Obsolete("Property was not intended for public use and will be removed.")]
[ObsoleteSince(29, 6)]
public static string Slash { get; }
Property Value
- string
Methods
GetString(string, string, bool)
Returns specified string.
public static string GetString(string stringName, string culture = null, bool useDefaultCulture = true)
Parameters
stringName
stringKey of the string
culture
stringCulture
useDefaultCulture
boolIf true the default culture translation is used if translation in chosen culture doesn't exist
Returns
- string
GetStringFormat(string, params object[])
Gets the given string and formats it with the standard String.Format method
public static string GetStringFormat(string stringName, params object[] parameters)
Parameters
stringName
stringString name
parameters
object[]Parameters for the formatting
Returns
- string
LocalizeString(string, string, bool, bool)
Replaces "{\(stringname\)}" expressions in given text with localized strings using given culture.
public static string LocalizeString(string inputText, string culture = null, bool encode = false, bool useDefaultCulture = true)
Parameters
inputText
stringInput text with localizable expressions
culture
stringCulture
encode
boolIf true, translations (replacements) are HTML encoded
useDefaultCulture
boolIf true the default culture translation is used if translation in chosen culture doesn't exist
Returns
- string