Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...Validator localizationValidator localization
Previous
 
Next
New Post
3/10/2009 4:47 AM
 

 Hello :)

I've been using the DNN localization features to localize any ASP.NET validator controls on my forms. One thing I noticed is that the localization doesn't seem to distinguish between the .Text and .ErrorMessage properties of validator controls.

What I'd like to have is an asterisk for an ErrorMessage, and a full descriptive text for the Text property. This way I can have a full validationsummary at the top of the form, and not clutter the form with a lot of text. In other words, only the .Text property needs to be localized.

When I add a resourcekey attribute to my validator controls, and add a ctlMyValidator.Text key to my local resource file, DotNetNuke sets both the .Text and .ErrorMessage properties to the same string. It does not appear to listen to any .ErrorMessage resource keys that I put in my local resource file.

However, the Localization Architecture documentation says the following:

 .Text – used for the text properties of controls (default
 .Help – used for help text (see more below)
 .Header – used for the headertext properties of DataGrid columns
 .EditText – used for the edittext properties of DataGrids
 .ErrorMessage – used for the ErrorMessage property of Validator controls

This seems to indicate that the localization is supposed to support different values for the Text and ErrorMessage properties of a validator control.

The Module Localization Guide doesn't say much more about this and some extended Googling turned up nothin. I was hoping anybody could shed some light on this. I could work around this by setting all validator Text properties in code, but if possible I'd like to make use of the resourcekey attribute.

Thanks in advance.

 
New Post
3/13/2009 5:11 AM
 

Looking though the DNN source I found the code that is responsible for applying the resourcekey to the relevant control properties. In the case of anything inheriting BaseValidator, it only sets the ErrorMessage property. Because BaseValidator inherits the Label class, the Text property is also set to the same resource value. Any controlkey.ErrorMessage keys in your resource files are ignored.

So I bit the bullet and just set all the ErrorMessage properties programmatically.

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...Validator localizationValidator localization


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out