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

HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Content Author Admin-able Miscellanous Text StringsContent Author Admin-able Miscellanous Text Strings
Previous
 
Next
New Post
6/26/2015 9:39 AM
 

Greetings,

New to DNN, I'm coming from a Sitecore background, so I have CMS experience. 

I'm wondering what the standard best practice is on where to store content managed simple strings. In Sitecore we have a "Dictionary" item, which is content managed and localized. It's a simple key/value pair. This is what I'm looking for. 

So, for example, the QUOTE and REPLY buttons on this page.. I'd like to have a Content Author be capable of editing the values for this text. I don't need localization at the moment, but would like to know how to do this with a single language for now, and localized if possible. On page editing would be great, but in a content admin area also acceptable.

And it's not just button text that I'm looking at, something like the Notification label, or Thread Status label, or really any non-html string that I don't want to use the HTML control for (that is going to inject <div>s and other sorts of code).

Thanks and cheers!

 

 
New Post
6/26/2015 11:01 AM
 
buttons, labals and help texts are static resources, stored in resource files and you may use the language editor in Admin > Languages (for desired language in the grid, select the pen for static resources in column Site or Host). For content localization, DNN built in option uses language specific pages with copies of each module.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
6/26/2015 12:55 PM
 

Thanks for the response, Sebastian!

I am partially working :) 

Here's what I've done, let's say my theme name is something creative, like MyTheme.

  • I added a file in my theme project, /App_LocalResources/MyTheme.resx, and added the following values:
    Save: Hello
    saveButton: 
    saveButton.Text: Save
  • In My Website > Languages > Language Editor, this resource file appears under Local Resources > Host Themes > MyTheme > App_LocalResources > MyTheme.resx

In my Home.ascx file, I can retrieve the Save value by doing this:
<%# Localization.GetString("Save")%>



Two questions:
1.)  I am unable to get the saveButton.Text out, either directly or with an <asp:Button resourcekey="saveButton" .. is there a resx or DNN convention that is in play here that's prohibiting the 'item.Text' convention from working as the Save text does?

2.) I am unable to specify a resource file for Localization.GetString() .. much of what I see on forums is 
Localization.GetSring(stringKey, this.LocalResourceFile. I'm assuming that most are using Modules which are inheriting from the right places, and potentially only one resx? With the Skin/Theme, I don't have 'this.LocalResourceFile' to throw in as that parameter. What is the preferred way to specify a resource file (in case I have several in app_localresources) for a theme? 


I've been hacking around here for a while and am thrilled to get the Save value coming out, but want to figure out how to take this further and implement properly. This is my first run with resx files like this, so I'm dealing this those issues too convention wise. 

Cheers!

 
New Post
6/26/2015 1:21 PM
 

Sorry, there was one more thing:

3.) Is the only way to edit these via the Admin/Language, or is there a way to have a content author edit these directly on the page?

Thanks!

 
New Post
6/26/2015 1:48 PM
 
#1
most DNN controls already come with support for localization, i.e. you don't need to call GetString manually. The module, however, needs to inherit from the proper base class. I suggest following one of the Module Templates (e.g.from cristoc on Codeplex)

#2
you may use the DNN:Text skin object to include localized text, which needs to be obtained from a shared resource file.

#3
static translation is reserved for admins, as saving resource files always initiates an app recycle. For all other use cases you may implement localization inside the module, but there is (currently) no support by the framework.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeGetting StartedGetting StartedNew to DNN Plat...New to DNN Plat...Content Author Admin-able Miscellanous Text StringsContent Author Admin-able Miscellanous Text Strings


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