Click here to Skip to main content
12,945,401 members (80,464 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 22 Feb 2011

DotNetNuke Resources keys

, 20 Mar 2011 CPOL
Rate this:
Please Sign up or sign in to vote.
DotNetNuke Resources keys
In DotnetNuke Localization support, every resource key (in APP_LocalResources or APP_GlobalResources) should end with an extension.

resourceName.Text – Represents a string used for a common purpose
resourceName.Help – Used mostly in conjuncture with the DNN:Label control, which supplies a help icon () and tooltip.
resourceName.Tooltip – Used for a control’s Tooltip property.
resourceName.Action – Used to represent the Title property of a ModuleAction item shown in an actions menu.
resourceName.Confirm – Text that is displayed in a JavaScript’s confirmation dialog (such as a dialog to confirm deleting a module).
resourceName.Error – Text that is displayed as an error message. This might be for a label or, more commonly, for one of the ASP.NET validation controls.
resourceName.Detail – Text that gives more detail about an error message.

If we add a resource key in a resx file of the APP_LocalResources or APP_GlobalResources and didn’t give it an extension (like one of the above or any other one), we cannot get its value back by the DNN Localization logic of the:
DotNetNuke.Services.Localization.Localization.GetString(key, this.LocalResourceFile);

DotNetNuke.Services.Localization.Localization.GetString(key, <global resource file name>);

Further, if we call the Localization.GetString function with a key without an extension, it will assume that we are asking about the one with the extension ".Text".
So the call of Localization.GetString("SomeKey", LocalResourceFile) is equivalent to
Localization.GetString("SomeKey.Text", LocalResourceFile)!


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Adel Refaat
Australia Australia
No Biography provided

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170518.1 | Last Updated 20 Mar 2011
Article Copyright 2011 by Adel Refaat
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid