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...Module Control KeyModule Control Key
Previous
 
Next
New Post
9/15/2009 6:16 AM
 

I have created a module called 'driving' and need to localise the title, when adding a title within the module definitions/then edit the control (view control) and a title the module doesn't load at all when deleting the key it works. I thought this was the correct way to localise a module title? if anyone knows any different please let me know, I did also add the controltitle_akey.Text to the resource file.

Thanks

 
New Post
9/15/2009 8:36 AM
 

In order for a module to display, the ControlKey of the module's default view control must be blank in the module definitions.

To localize control titles using resorce files, the localization key must be:

ControlTitle_controlkey.Text

where "controlkey" is the module control's ControlKey. Note in particular the use of upper and lower case . . . upper case "C" and "T" in "ControlTitle" and lower case for the ControlKey. For example, for the module control EditDriving.ascx, the following localization key (in the file DesktopModules\<ModuleName>\App_LocalResources\EditDriving.ascx.resx) for the control having ControlKey of "edit" would be:

ControlTitle_edit.Text

Although I have not tested this, I believe that the localization key for the title of the default view control (which does not have a ControlKey) would be:

ControlTitle_.Text


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
9/16/2009 4:36 AM
 

Hi William,

Thanks for the clarification, however when trying

ControlTitle_.Text

That doesn't work, just wondering whether anyone else has managed to successfully translate a module title? and how?

Thanks

 

 
New Post
9/16/2009 9:57 AM
 

 I think that ControlTitle_.Text is supposed to work; There are a lot of entries for it in the resx files in the DNN source.

The function that was used prior to DNN 5 (I'm working with DNN 5 to test this stuff) was Deprecated, and in the new function, it has the line
            If String.IsNullOrEmpty(controlTitle) AndAlso Not String.IsNullOrEmpty(controlKey) Then
Where the 'controlKey' variable is going to be blank, making the localization not take effect.

LocalizeControlTitle in Localization.vb @ line 1422 is where I pulled that from.


To note - I spent 5 minutes on this, so I could be wrong, but... ControlTitle_.Text didn't work for me either, and I checked the DNN 5.1.2 source I have for it, found it lots of places... And then found that function. I could be entirely wrong is what I'm getting at, it just looks kinda like it's specifically excluding the blank controlKey, where as the previous function does not appear to have done that.

 

 

Excellent overall question though, I did not know about it, and am now planning to use it in many places.

 
New Post
9/17/2009 4:43 PM
 

default control key is not needed - this is module name,  taken from the module table itself (or overridden by certain modules).


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...Module Control KeyModule Control Key


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