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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Using Another Modules LocalizationUsing Another Modules Localization
Previous
 
Next
New Post
10/1/2009 7:45 PM
 

Thank you for your reply. Maybe not clear enough, but this shared resource file is within my own desktop modules and is my own shared file with resources for all my shop logic. But virtually using SharedResourceFile = DNN's shared file is the same. The strange thing is that if you substitute that like you do it works, but if you fill in your own resource file like I did, you get a null ...

string test2 = Localization.GetString("ShoppingCart", Server.MapPath(Localizations.SharedResourceFile));

public const string SharedResourceFile = "DesktopModules/bBaytShoppingEngine/App_LocalResources/SharedResources.resx";

 
New Post
10/1/2009 9:42 PM
 

 Localization.SharedResourceFile points to "App_GlobalResources/SharedResources.resx"
because of that this line
Localization.GetString("ShoppingCart", Localization.SharedResourceFile); 
will always be returning Null/Empty. You will need to drop the Localization. in the Localization.SharedResourceFile part of the line.
This will turn your line into
Localization.GetString("ShoppingCart", SharedResourceFile); 
That should work for you.

In case we are trying to say the same thing, and just missing it - I suggest this:
Rename your public const string to mySharedResourceFile which will not conflict with anything the DNN Core has. Once you get it working as that, renaming it back would work fine.
I tend to do little renames like that when I'm using the same name as something else in a framework I'm using. It allows me to make sure I'm trying to use my file, and not something else.

 

 
New Post
10/2/2009 7:19 AM
 

Hi ,

We use additional S in our resource and namespace. We did install a DNN 5.1.2 source version and create a test case, but the problem cannot be found there. We did not try to create a new desktopmodule and put the source code there. We did put our test case in the page-init and there it works. However on our dev with upgrade of DNN 5.1.2 we get null for every resource look up.

Any help appreciated

J.
 

 
New Post
10/2/2009 9:56 AM
 

 Ahh, so the extra 's' isn't a typo. Ok, that clears up a little for me. I apologize for getting confused on that on.

In your SharedResource file is the entry ShoppingCart or is it ShoppingCart.Text? It will need to be ShoppingCart.Text to work correctly when using the GetString method and just ShoppingCart. The GetString function checks if it has an 'extension' and if it doesn't it will add .Text. It will also work if you specify, such as 
Localization.GetString("ShoppingCart.Text", (Localizations.SharedResourceFile) 

I hope that helps - I think I'm running low on ideas. :)

 
New Post
10/2/2009 1:52 PM
 

Thankx,

We are setting up DNN 5.0.1 and then put all versions in SVN to see what changed over the time. We could not reproduce the problem with a DNN 5.1.2 version. Costs a lot of time and "angryness" to get this done. Already 8 man days wasted again. Every upgrade is horrible. In most cases it is something very stupid. But now we are a bit confused what is going on. Currently a lot of bank websites report to be broken or in maintenance. For that security reason we want to be up to date.

J.

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Using Another Modules LocalizationUsing Another Modules Localization


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