View Article

There are times that you want to localize the title of a module, for example, in my articles module when viewing an article, the title of the module is called "View Article".

You may want to now localize this value, typically you would have to set it in code. A tip that some people don't know (including myself) is that you can localize this value automatically by adding a special entry into that control's resx file.


If you add the entry, ControlTitle_{ControlKey}.Text and a value to match, it will automatically set this value in the core based on the selected user's language.

For my purposes, my control was called "ArticleView", so my entry would be:-


And then you would add a value as normal.

Important! The control name must be represented in lower case otherwise it will not work.

Hopefully this will help someone, it took me a while to work out.
Posted in: DotNetNuke

Post Rating


Anonymous User
# Anonymous User
Thursday, June 16, 2005 7:31 PM
Can't get it to work... :-(
Philipp Becker
# Philipp Becker
Thursday, June 16, 2005 7:34 PM
Ah, I see. It has to be the control's key, not the title...!
Philipp Becker
# Philipp Becker
Thursday, June 16, 2005 7:54 PM
There should be something similar for the helptext of the control - like in the module setting where it says "Here you can define...."
Anonymous User
# Anonymous User
Tuesday, November 1, 2005 8:32 PM
Hi Scott: Where do I find the ControlKey?
Scott McCulloch
# Scott McCulloch
Tuesday, November 1, 2005 9:21 PM
In Host -> Module Definitions, each control has a key, the default one will be blank, but that will use the title the user puts in when adding the module to the page
Mohamed Rashed
# Mohamed Rashed
Wednesday, November 30, 2005 7:42 AM
i can't get it work with Dnn 3.2.0 ...
if it work please give an example how it work with the first control in the module [which hasn't a control key] i tried your solution but not working .. !!!
Cory Isakson
# Cory Isakson
Wednesday, February 15, 2006 4:17 PM
Anyone know a way to set the title in code? I would like to set the module title that gets rendered to a specific value related to the item being rendered.
Scott McCulloch
# Scott McCulloch
Thursday, February 16, 2006 4:41 AM
Cory, try this article:-
# Wolfgang
Tuesday, April 25, 2006 12:05 PM
Sorry, I do not get the point. Above article tells how to change the page title, but I would like to know how to localize the module title of the default (=view) module which has no controlkey. ControlTitle_.Text does not work.
Scott McCulloch
# Scott McCulloch
Tuesday, April 25, 2006 6:31 PM
Your right, there is no way for "content localization" yet. Module titles and content aren't localizable yet, without 3rd party modules.

DNN currently only supports static localization.

Post Comment

Only registered users may post comments.