DotNetNuke Modules – Internationalization (part 2)

Last Thursday, we looked at how you could change the text of the modules in DotNetNuke.  Today, we want to show you how to add that same capability to your own modules.

When you created your module, one of the directories that was created for you was a directory named “App_LocalResources”.  In this directory are three resx files that should hold the strings you will be using in your modules.

If you open up one of them, you will see several strings that have already been added for you.

You’ll remember that last week, we looked at the action menus.  One of the parameters that we passed in to create the action menu looked like:

Localization.GetString(ModuleActionType.AddContent,
                this.LocalResourceFile)

That ModuleActionType.AddContent actually is the string “AddContent.Action” which you will find in the “ViewDMBSample.ascx.resx” file.  You will see that “AddContent.Action” resolves to “Add Content” in the resx file.

 

Other post in DotNetNuke - Module Development

Related Post

  • DotNetNuke Modules – Creating Base ModulesDotNetNuke Modules – Creating Base Modules
    Now that we have DotNetNuke installed into Visual Studio we can go ahead and create our first modules. Actually, creating the modules is pretty simple. But it is even easier to do it wrong, which...
  • DotNetNuke – InternationalizationDotNetNuke – Internationalization
    One of the core features of DotNetNuke is that all of the text that shows up on a page either comes out of the database or out of resource files.  Anything that comes out of the resource files can ...
  • DotNetNuke Modules – LinkButtonsDotNetNuke Modules – LinkButtons
    As you can probably already guess, localizing a LinkButton in DotNetNuke is pretty straightforward. But you'll never guess what most people miss when they add this little control to their DotNetNuk...
  • DotNetNuke Modules – Module SettingsDotNetNuke Modules – Module Settings
    Since each instance of a module that we put on a page should be able to have it's own configuration information, it is necessary to have some place that will allow us to configure it. For examp...
  • DotNetNuke Modules – Labels w/ no HelpDotNetNuke Modules – Labels w/ no Help
    While the bulk of the labels you use on a module will be DotNetNuke labels, occasionally you want to be able to put text on the screen that doesn't need context help and doesn't need to be associat...

4 Responses to “DotNetNuke Modules – Internationalization (part 2)”

  • [...] Internationalization (Part 2) [...]

  • Creating resource files for standard .Net controls:

    Hi,

    This tutorial seems unfinished. Will you be coming back to it?

    Regardless, it is very useful, thanks. I have one question:

    Can you create resource files for standard controls – like the Asp Label control? Or do you have to use the DNN label control? The reason I ask is because the DNN labels come with those help images and other formatting which I could really do without.

  • Dave:

    This is one of several articles on the topic. The very next article in this series covers your question.

    See that list of links that are right before the comments? That’s all the articles in the series on creating DNN Modules.

  • Oops:

    :)

    sometimes it pays to actually read things- thanks

Leave a Reply

Comment Policy:

  • You must verify your comment by responding to the automated email that is sent to your email address. Unverified comments will never show.Leave a good comment that adds to the conversation and I'll leave your link in.
  • Leave me pure spam and I'll delete it.
  • Leave a general comment and I'll remove the link but keep the comment.

Notify me of followup comments via e-mail

Bear