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

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Localization problem with 5.1.1Localization problem with 5.1.1
Previous
 
Next
New Post
7/31/2009 3:29 PM
 

Hi,

I'm having a problem with some code that worked in 5.0.1 - but doesn't appear to be working in 5.1.1 - I'm thinking that perhaps there have been changes to how localization is handled.

This code worked in 5.0.1:

**************

Dim strPath As String = "~/DesktopModules/CambrianSideImage/" & Localization.LocalResourceDirectory & "/" & Localization.LocalSharedResourceFile

Dim strDefaultContent As String = DotNetNuke.Services.Localization.Localization.GetString("DefaultImageContent", strPath)

*************

The string strPath points to the correct file, but...

In 5.1.1, strDefaultContent returns Nothing - for some reason it is not retrieving the value of the DefaultImageContent string in the sharedresources.resx file.

Any ideas? 

 

 

 

 
New Post
8/1/2009 6:07 AM
 

I am seeing this issue on another portal I was looking at, in fact, this wasn't working:-

Localization.GetString("valFieldRequired", Me.LocalResourceFile)

It returns a value of nothing.


Scott McCulloch
Developer, F5 Networks
Owner, Ventrian DotNetNuke Modules
 
New Post
8/1/2009 8:43 AM
 

Same here - it happens when trying to access the SharedResources.resx - and the resource files for the ascx files (i.e. view.ascx.resx) using the same code you are using.

 
New Post
8/1/2009 9:34 PM
 

just a guess (I haven't had a look at DNN 5.1.1 yet): did you use proper capitalization of files and folders?


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
8/3/2009 9:47 AM
 

Hi,

The path and filenames are capitalized correctly (i.e. the value of the path variable below matches the path and file name).

The user control is named View.ascx
Running DNN 5.1.1.98
Windows Vista Home Premium
Default AppPool
IIS Physical Path: C:\devportals\Cambrian
IIS Virtual Path: /cambrian

Note:  The code below, that returns Nothing in 5.1.1.98- runs just fine in 5.0.1...

********************************

Here is the code:

Dim strPath As String = "~/DesktopModules/CambrianSideAd/" & Localization.LocalResourceDirectory & "/" & Localization.LocalSharedResourceFile

*** strPath returns:  "~/DesktopModules/CambrianSideAd/App_LocalResources/SharedResources.resx"

Dim strDefaultContent As String = DotNetNuke.Services.Localization.Localization.GetString("DefaultContent", strPath)

*** strDefaultContent returns nothing - in the SharedResources.resx file, DefaultContent.Text = "This is the default content"

Dim strTest As String = Localization.GetString("AdContent", LocalResourceFile)

*** strTest also returns nothing, in View.ascx.resx, AdContent = "Here is the ad content"

This really has me stumped...

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Localization problem with 5.1.1Localization problem with 5.1.1


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