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...Building ExtensionsBuilding ExtensionsModulesModulesWeird cache or unknown propblem with dotnetnuke Localization.GetString funtionWeird cache or unknown propblem with dotnetnuke Localization.GetString funtion
Previous
 
Next
New Post
3/15/2013 3:43 AM
 
Hi guys,
I have two portals on which i have dropped the module on different pages.
I am setting the this.LocalResourceFile on the basis of portal ID correctly

if (PortalId == 2)
            {
                string FileName = System.IO.Path.GetFileNameWithoutExtension(this.AppRelativeVirtualPath);
                if (this.ID != null)                    
                    this.LocalResourceFile = this.LocalResourceFile.Replace(this.ID, FileName) + ".ascx.es-ES.resx";
                else                    
                    this.LocalResourceFile = this.LocalResourceFile + FileName + ".ascx.es-ES.resx";
            }
When i open my page where portalid is not 2 it show the page fine
Then if i open the page where portal id is 2 then that page works also fine.But here starts problem            

Now if I open a page where the portal is not 2 then still it shows the portalid 2 respource file data


When i put watch on

var myteststr = Localization.GetString("CommentRes1", this.LocalResourceFile)
although this.LocalResourceFile is set coorectly but Localization.GetString("CommentRes1", this.LocalResourceFile) gives portalid 2 resource data
Don't know what's the problem and how can i correct it
 
New Post
3/15/2013 7:01 AM
 
Kamran,

in my opinion, there should be no need to change or set the LocalResourceFile.

Localization.GetString("CommentRes1.Text", base.LocalResourceFile) should do.

Take care, if you reference the key only by "CommentRes1", it must be "CommentRes1.Text" in the resource file!

Best wishes
Michael

Michael Tobisch
DNN★MVP

dnn-Connect.org - The most vibrant community around the DNN-platform
 
Previous
 
Next
HomeHomeDevelopment and...Development and...Building ExtensionsBuilding ExtensionsModulesModulesWeird cache or unknown propblem with dotnetnuke Localization.GetString funtionWeird cache or unknown propblem with dotnetnuke Localization.GetString funtion


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