Class Localization
Assembly: DotNetNuke.dll
Syntax
public class Localization
Constructors
Localization()
Declaration
Properties
ApplicationResourceDirectory
Declaration
public static string ApplicationResourceDirectory { get; }
Property Value
CurrentCulture
Declaration
public string CurrentCulture { get; }
Property Value
CurrentUICulture
Declaration
public string CurrentUICulture { get; }
Property Value
ExceptionsResourceFile
Declaration
public static string ExceptionsResourceFile { get; }
Property Value
GlobalResourceFile
Declaration
public static string GlobalResourceFile { get; }
Property Value
KeyName
Declaration
public static string KeyName { get; set; }
Property Value
LocalResourceDirectory
Declaration
public static string LocalResourceDirectory { get; }
Property Value
LocalSharedResourceFile
Declaration
public static string LocalSharedResourceFile { get; }
Property Value
SharedResourceFile
Declaration
public static string SharedResourceFile { get; }
Property Value
ShowMissingKeys
Declaration
public static bool ShowMissingKeys { get; }
Property Value
SupportedLocalesFile
Declaration
public static string SupportedLocalesFile { get; }
Property Value
SystemLocale
Declaration
public static string SystemLocale { get; }
Property Value
SystemTimeZone
Declaration
public static string SystemTimeZone { get; }
Property Value
Methods
ActiveLanguagesByPortalID(int)
Declaration
public static int ActiveLanguagesByPortalID(int portalID)
Parameters
Type |
Name |
Description |
int |
portalID |
|
Returns
AddLanguageToPortal(int, int, bool)
Declaration
public static void AddLanguageToPortal(int portalID, int languageID, bool clearCache)
Parameters
Type |
Name |
Description |
int |
portalID |
|
int |
languageID |
|
bool |
clearCache |
|
AddLanguageToPortals(int)
Declaration
public static void AddLanguageToPortals(int languageID)
Parameters
Type |
Name |
Description |
int |
languageID |
|
AddLanguagesToPortal(int)
Declaration
public static void AddLanguagesToPortal(int portalID)
Parameters
Type |
Name |
Description |
int |
portalID |
|
AddTranslatorRole(int, Locale)
Declaration
public static void AddTranslatorRole(int portalID, Locale language)
Parameters
Type |
Name |
Description |
int |
portalID |
|
Locale |
language |
|
BestCultureCodeBasedOnBrowserLanguages(IEnumerable<string>)
Declaration
public static string BestCultureCodeBasedOnBrowserLanguages(IEnumerable<string> cultureCodes)
Parameters
Returns
BestCultureCodeBasedOnBrowserLanguages(IEnumerable<string>, string)
Declaration
public static string BestCultureCodeBasedOnBrowserLanguages(IEnumerable<string> cultureCodes, string fallback)
Parameters
Returns
ConvertLegacyTimeZoneOffsetToTimeZoneInfo(int)
Declaration
public static TimeZoneInfo ConvertLegacyTimeZoneOffsetToTimeZoneInfo(int timeZoneOffsetInMinutes)
Parameters
Type |
Name |
Description |
int |
timeZoneOffsetInMinutes |
|
Returns
DeleteLanguage(Locale)
Declaration
public static void DeleteLanguage(Locale language)
Parameters
Type |
Name |
Description |
Locale |
language |
|
DeleteLanguage(Locale, bool)
Declaration
public static void DeleteLanguage(Locale language, bool isInstalling)
Parameters
Type |
Name |
Description |
Locale |
language |
|
bool |
isInstalling |
|
GetBrowserCulture(int)
Declaration
public static CultureInfo GetBrowserCulture(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
Returns
GetCultureLanguageID(string)
Declaration
public static int GetCultureLanguageID(string cultureCode)
Parameters
Type |
Name |
Description |
string |
cultureCode |
|
Returns
GetExceptionMessage(string, string)
Declaration
public static string GetExceptionMessage(string key, string defaultValue)
Parameters
Returns
GetExceptionMessage(string, string, params object[])
Declaration
public static string GetExceptionMessage(string key, string defaultValue, params object[] @params)
Parameters
Returns
GetFixedCurrency(decimal, string, int)
Declaration
public string GetFixedCurrency(decimal expression, string culture, int numDigitsAfterDecimal)
Parameters
Type |
Name |
Description |
decimal |
expression |
|
string |
culture |
|
int |
numDigitsAfterDecimal |
|
Returns
GetFixedDate(DateTime, string)
Declaration
public string GetFixedDate(DateTime expression, string culture)
Parameters
Returns
GetLanguageDisplayMode(int)
Declaration
public static string GetLanguageDisplayMode(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
Returns
GetLocaleName(string, CultureDropDownTypes)
Declaration
public static string GetLocaleName(string code, CultureDropDownTypes displayType)
Parameters
Returns
GetPageLocale(IPortalSettings)
Declaration
public static CultureInfo GetPageLocale(IPortalSettings portalSettings)
Parameters
Returns
GetPageLocale(PortalSettings)
Declaration
[Obsolete("Deprecated in DotNetNuke 9.8.0. Use overload taking IPortalSettings instead. Scheduled for removal in v11.0.0.")]
public static CultureInfo GetPageLocale(PortalSettings portalSettings)
Parameters
Returns
GetResourceFile(Control, string)
Declaration
public static string GetResourceFile(Control control, string fileName)
Parameters
Returns
GetResourceFileName(string, string, string, int)
Declaration
public static string GetResourceFileName(string resourceFileName, string language, string mode, int portalId)
Parameters
Returns
GetSafeJSString(string)
Declaration
public static string GetSafeJSString(string unsafeString)
Parameters
Type |
Name |
Description |
string |
unsafeString |
|
Returns
GetSafeJSString(string, string)
Declaration
public static string GetSafeJSString(string key, string resourceFileRoot)
Parameters
Returns
GetString(string)
Declaration
public static string GetString(string key)
Parameters
Type |
Name |
Description |
string |
key |
|
Returns
GetString(string, PortalSettings)
Declaration
public static string GetString(string key, PortalSettings portalSettings)
Parameters
Returns
GetString(string, string)
Declaration
public static string GetString(string key, string resourceFileRoot)
Parameters
Returns
GetString(string, string, PortalSettings, string)
Declaration
public static string GetString(string key, string resourceFileRoot, PortalSettings portalSettings, string language)
Parameters
Returns
GetString(string, string, PortalSettings, string, bool)
Declaration
public static string GetString(string key, string resourceFileRoot, PortalSettings portalSettings, string language, bool disableShowMissingKeys)
Parameters
Returns
GetString(string, string, bool)
Declaration
public static string GetString(string key, string resourceFileRoot, bool disableShowMissingKeys)
Parameters
Type |
Name |
Description |
string |
key |
|
string |
resourceFileRoot |
|
bool |
disableShowMissingKeys |
|
Returns
GetString(string, string, string)
Declaration
public static string GetString(string key, string resourceFileRoot, string language)
Parameters
Returns
GetString(string, Control)
Declaration
public static string GetString(string key, Control ctrl)
Parameters
Returns
GetStringUrl(string, string)
Declaration
public static string GetStringUrl(string key, string resourceFileRoot)
Parameters
Returns
GetSystemMessage(PortalSettings, string)
Declaration
public static string GetSystemMessage(PortalSettings portalSettings, string messageName)
Parameters
Returns
GetSystemMessage(PortalSettings, string, UserInfo)
Declaration
public static string GetSystemMessage(PortalSettings portalSettings, string messageName, UserInfo userInfo)
Parameters
Returns
GetSystemMessage(PortalSettings, string, UserInfo, string)
Declaration
public static string GetSystemMessage(PortalSettings portalSettings, string messageName, UserInfo userInfo, string resourceFile)
Parameters
Returns
GetSystemMessage(PortalSettings, string, UserInfo, string, ArrayList)
Declaration
public static string GetSystemMessage(PortalSettings portalSettings, string messageName, UserInfo userInfo, string resourceFile, ArrayList custom)
Parameters
Returns
GetSystemMessage(PortalSettings, string, string)
Declaration
public static string GetSystemMessage(PortalSettings portalSettings, string messageName, string resourceFile)
Parameters
Returns
GetSystemMessage(PortalSettings, string, string, ArrayList)
Declaration
public static string GetSystemMessage(PortalSettings portalSettings, string messageName, string resourceFile, ArrayList custom)
Parameters
Returns
GetSystemMessage(string, PortalSettings, string, UserInfo)
Declaration
public static string GetSystemMessage(string strLanguage, PortalSettings portalSettings, string messageName, UserInfo userInfo)
Parameters
Returns
GetSystemMessage(string, PortalSettings, string, UserInfo, string, ArrayList)
Declaration
public static string GetSystemMessage(string strLanguage, PortalSettings portalSettings, string messageName, UserInfo userInfo, string resourceFile, ArrayList custom)
Parameters
Returns
GetSystemMessage(string, PortalSettings, string, UserInfo, string, ArrayList, IDictionary, string, int)
Declaration
public static string GetSystemMessage(string strLanguage, PortalSettings portalSettings, string messageName, UserInfo userInfo, string resourceFile, ArrayList customArray, IDictionary customDictionary, string customCaption, int accessingUserID)
Parameters
Returns
GetSystemMessage(string, PortalSettings, string, UserInfo, string, ArrayList, string, int)
Declaration
public static string GetSystemMessage(string strLanguage, PortalSettings portalSettings, string messageName, UserInfo userInfo, string resourceFile, ArrayList custom, string customCaption, int accessingUserID)
Parameters
Returns
LoadCultureDropDownList(DropDownList, CultureDropDownTypes, string)
Declaration
public static void LoadCultureDropDownList(DropDownList list, CultureDropDownTypes displayType, string selectedValue)
Parameters
LoadCultureDropDownList(DropDownList, CultureDropDownTypes, string, bool)
Declaration
public static void LoadCultureDropDownList(DropDownList list, CultureDropDownTypes displayType, string selectedValue, bool loadHost)
Parameters
LoadCultureDropDownList(DropDownList, CultureDropDownTypes, string, string, bool)
Declaration
public static void LoadCultureDropDownList(DropDownList list, CultureDropDownTypes displayType, string selectedValue, string filter, bool host)
Parameters
LoadCultureInListItems(CultureDropDownTypes, string, string, bool)
Declaration
public static IEnumerable<ListItem> LoadCultureInListItems(CultureDropDownTypes displayType, string selectedValue, string filter, bool host)
Parameters
Returns
LocalizeControlTitle(IModuleControl)
Declaration
public static string LocalizeControlTitle(IModuleControl moduleControl)
Parameters
Returns
LocalizeDataGrid(ref DataGrid, string)
Declaration
public static void LocalizeDataGrid(ref DataGrid grid, string resourceFile)
Parameters
LocalizeDetailsView(ref DetailsView, string)
Declaration
public static void LocalizeDetailsView(ref DetailsView detailsView, string resourceFile)
Parameters
LocalizeGridView(ref GridView, string)
Declaration
public static void LocalizeGridView(ref GridView gridView, string resourceFile)
Parameters
LocalizeRole(string)
Declaration
public static string LocalizeRole(string role)
Parameters
Type |
Name |
Description |
string |
role |
|
Returns
RemoveLanguageFromPortal(int, int)
Declaration
public static void RemoveLanguageFromPortal(int portalID, int languageID)
Parameters
Type |
Name |
Description |
int |
portalID |
|
int |
languageID |
|
RemoveLanguageFromPortal(int, int, bool)
Declaration
public static void RemoveLanguageFromPortal(int portalID, int languageID, bool isInstalling)
Parameters
Type |
Name |
Description |
int |
portalID |
|
int |
languageID |
|
bool |
isInstalling |
|
RemoveLanguageFromPortals(int)
Declaration
public static void RemoveLanguageFromPortals(int languageId)
Parameters
Type |
Name |
Description |
int |
languageId |
|
RemoveLanguageFromPortals(int, bool)
Declaration
public static void RemoveLanguageFromPortals(int languageId, bool isInstalling)
Parameters
Type |
Name |
Description |
int |
languageId |
|
bool |
isInstalling |
|
RemoveLanguagesFromPortal(int)
Declaration
public static void RemoveLanguagesFromPortal(int portalId)
Parameters
Type |
Name |
Description |
int |
portalId |
|
SaveLanguage(Locale)
Declaration
public static void SaveLanguage(Locale locale)
Parameters
Type |
Name |
Description |
Locale |
locale |
|
SaveLanguage(Locale, bool)
Declaration
public static void SaveLanguage(Locale locale, bool clearCache)
Parameters
Type |
Name |
Description |
Locale |
locale |
|
bool |
clearCache |
|
SetLanguage(string)
Declaration
public static void SetLanguage(string value)
Parameters
Type |
Name |
Description |
string |
value |
|
SetThreadCultures(CultureInfo, IPortalSettings)
Declaration
public static void SetThreadCultures(CultureInfo cultureInfo, IPortalSettings portalSettings)
Parameters
SetThreadCultures(CultureInfo, PortalSettings)
Declaration
[Obsolete("Deprecated in DotNetNuke 9.8.0. Use overload taking IPortalSettings instead. Scheduled for removal in v11.0.0.")]
public static void SetThreadCultures(CultureInfo cultureInfo, PortalSettings portalSettings)
Parameters
Extension Methods