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...Localize ASP.net Validator ControlsLocalize ASP.net Validator Controls
Previous
 
Next
New Post
12/8/2009 8:18 PM
 

I am building modules which support Localization. I have several modules which have forms for various purposes. These forms have required fields as well as regular expression validators. I have already localized all labels and text based controls in the form but am having a hard time finding examples of how to localize the error message for ASP.net validation controls in DotNetNuke modules.

Can someone please help me out, Thanks a ton in advance!

 
New Post
12/8/2009 9:41 PM
 

In the validator markup, add the 'resourcekey' attribute with its key ending witht he suffix '.ErrorMessage. For example:

resourcekey = "valWidthNumeric.ErrorMessage"

In the resource file corresonding to the user control, add a new string for the desired error message with its key being "valWidthNumeric.ErrorMessage".

For more complex validation error messages, you may also set them in the codefile/codebehind using one of the overloads of the Localization.GetString method.


Bill, WESNet Designs
Team Lead - DotNetNuke Gallery Module Project (Not Actively Being Developed)
Extensions Forge Projects . . .
Current: UserExport, ContentDeJour, ePrayer, DNN NewsTicker, By Invitation
Coming Soon: FRBO-For Rent By Owner
 
New Post
7/23/2010 7:36 PM
 
This localizes the ErrorMessage and the Text attributes.  How can I stop it from localizing the Text?

I created a method that sets the Text to "*" for all the validators on the page, and I call that method in Page_Init, Page_Load, LoadSettings(), and Page_PreRender - but the localized Text is still there.
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...Localize ASP.net Validator ControlsLocalize ASP.net Validator Controls


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