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.")]
public static string Dash { get; }
Property Value
- string
Slash
Slash symbol.
[Obsolete("Property was not intended for public use and will be removed.")]
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
stringNamestringKey of the string
culturestringCulture
useDefaultCultureboolIf 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
stringNamestringString name
parametersobject[]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
inputTextstringInput text with localizable expressions
culturestringCulture
encodeboolIf true, translations (replacements) are HTML encoded
useDefaultCultureboolIf true the default culture translation is used if translation in chosen culture doesn't exist
Returns
- string