• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Improve this Doc

Interface ILocalizationProvider

Do not implement. This interface is only implemented by the DotNetNuke core framework. Outside the framework it should used as a type and for unit test purposes only. There is no guarantee that this interface will not change.

Namespace: DotNetNuke.Services.Localization
Assembly: DotNetNuke.dll
Syntax
public interface ILocalizationProvider

Methods

| Improve this Doc View Source

GetCompiledResourceFile(PortalSettings, String, String)

Gets a compiled resource file for a specific language and portal. This takes the original resource file and overwrites it with any keys found in localized and overridden resource files according to .net and DNN rules.

Declaration
Dictionary<string, string> GetCompiledResourceFile(PortalSettings portalSettings, string resourceFile, string locale)
Parameters
Type Name Description
PortalSettings portalSettings

The portal settings for the requesting portal. Only used to retrieve PortalId and DefaultLanguage.

System.String resourceFile

The resource file to be retrieved. Relative path from DNN's root starting with /.

System.String locale

The requested locale. You should use the thread locale by default.

Returns
Type Description
Dictionary<System.String, System.String>

Dictionary of key value pairs where the keys are the localization keys and the values the localized texts.

| Improve this Doc View Source

GetString(String, String, String, PortalSettings, Boolean)

Do not implement. This interface is only implemented by the DotNetNuke core framework. Outside the framework it should used as a type and for unit test purposes only. There is no guarantee that this interface will not change.

Declaration
string GetString(string key, string resourceFileRoot, string language, PortalSettings portalSettings, bool disableShowMissingKeys)
Parameters
Type Name Description
System.String key
System.String resourceFileRoot
System.String language
PortalSettings portalSettings
System.Boolean disableShowMissingKeys
Returns
Type Description
System.String
| Improve this Doc View Source

GetString(String, String, String, PortalSettings)

Do not implement. This interface is only implemented by the DotNetNuke core framework. Outside the framework it should used as a type and for unit test purposes only. There is no guarantee that this interface will not change.

Declaration
string GetString(string key, string resourceFileRoot, string language, PortalSettings portalSettings)
Parameters
Type Name Description
System.String key
System.String resourceFileRoot
System.String language
PortalSettings portalSettings
Returns
Type Description
System.String
| Improve this Doc View Source

GetString(String, String, String)

Do not implement. This interface is only implemented by the DotNetNuke core framework. Outside the framework it should used as a type and for unit test purposes only. There is no guarantee that this interface will not change.

Declaration
string GetString(string key, string resourceFileRoot, string language)
Parameters
Type Name Description
System.String key
System.String resourceFileRoot
System.String language
Returns
Type Description
System.String
| Improve this Doc View Source

GetString(String, String)

Do not implement. This interface is only implemented by the DotNetNuke core framework. Outside the framework it should used as a type and for unit test purposes only. There is no guarantee that this interface will not change.

Declaration
string GetString(string key, string resourceFileRoot)
Parameters
Type Name Description
System.String key
System.String resourceFileRoot
Returns
Type Description
System.String
| Improve this Doc View Source

SaveString(String, String, String, String, PortalSettings, LocalizationProvider.CustomizedLocale, Boolean, Boolean)

Saves a string to a resource file.

Declaration
bool SaveString(string key, string value, string resourceFileRoot, string language, PortalSettings portalSettings, LocalizationProvider.CustomizedLocale resourceType, bool addFile, bool addKey)
Parameters
Type Name Description
System.String key

The key to save (e.g. "MyWidget.Text").

System.String value

The text value for the key.

System.String resourceFileRoot

Relative path for the resource file root (e.g. "DesktopModules/Admin/Lists/App_LocalResources/ListEditor.ascx.resx").

System.String language

The locale code in lang-region format (e.g. "fr-FR").

PortalSettings portalSettings

The current portal settings.

LocalizationProvider.CustomizedLocale resourceType

Specifies whether to save as portal, host or system resource file.

System.Boolean addFile

if set to true a new file will be created if it is not found.

System.Boolean addKey

if set to true a new key will be created if not found.

Returns
Type Description
System.Boolean

If the value could be saved then true will be returned, otherwise false.

Extension Methods

JsonExtensionsWeb.ToJson(Object)
  • View Source
Back to top by the community, for the community... #DNNCMS