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 SourceGetCompiledResourceFile(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. |
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 |
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 |
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 |
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 |
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 |
System.Boolean | addKey | if set to |
Returns
Type | Description |
---|---|
System.Boolean | If the value could be saved then true will be returned, otherwise false. |