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

HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...Please help me to get LocalResources for each modulePlease help me to get LocalResources for each module
Previous
 
Next
New Post
3/31/2009 3:46 AM
 

Hi everyone,

In DNN 5.0,

I try to make multilanguage (French and English) for my website.

I put some files resource follow the structure in DNN

DesktopModules

        ProjectX

                   LeftNavigation

                               App_LocalResources

                                           leftnav.ascx.en-us.resx

                                           leftnav.ascx.fr-fr.resx

                               leftnav.ascx

 

And I put some code in leftnav.ascx.vb

         Dim CurrentCulture as String = "fr-fr"

         System.Threading.Thread.CurrentThread.CurrentCulture = System.Globalization.CultureInfo.CreateSpecificCulture(CurrentCulture)
         System.Threading.Thread.CurrentThread.CurrentUICulture = New System.Globalization.CultureInfo(CurrentCulture)

         SlideMenu.Text = Localization.GetString("Hello", Me.LocalResourceFile)    'SlideMenu is a label

But nothing will be displayed because lblText cannot receive any results.

I know Me.LocalResourceFile maybe is not correct. It shows like 

 

/projectx/DesktopModules/projectx/leftnavigation//App_LocalResources/slidemenu

 

I dont know why it adds more /slidemenu at the end of path

What should I do? How can I do to make lblText get the right value.

Sorry, my english is bad.

Thank you,

Best regards,

 

 
New Post
3/31/2009 11:10 AM
 

Assuming you are creating a module named slidemenu.ascx, your resources should be located in App_LocalResources/slidemenu.ascx.resx (with culture-specific codes added). Me.LocalResourceFile is automatically set up that way (so what you see in yours is correct, without extension or culture-codes), so you probably might want to follow that scheme (and move your resources). You probably could change LocalResourcesFile, but I don't see a compelling reason to do so. Also, when you use Localization.GetString (in your example you load "Hello"), anytime your resource key doesn't have a "." in it, GetString appends ".Text", so you are really loading "Hello.Text".

 
New Post
3/31/2009 12:34 PM
 

please check out localization whitepaper and module development loclaization guide, both can be found in Support > Documentation > downloadable files in menu above.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...Please help me to get LocalResources for each modulePlease help me to get LocalResources for each module


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