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

HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsLanguage PacksLanguage PacksSwitching languages manuallySwitching languages manually
Previous
 
Next
New Post
1/2/2007 9:03 AM
 

Is it possible to manually switch between languages in a module I am developing? I need somthing like System.Threading.Thread.CurrentThread.CurrentCulture (wich is normally set in InitializeCulture method of a ASP.Net page). I tried Localization.SetLanguage method but it doesnt seem to work.

I need my module have its own mean to switch languages

Any help is appreciated.

 
New Post
1/4/2007 4:41 AM
 

Looking at the DNN code is always a good idea since it does the same you need. In this case this is the code we use in the language selector to change the current language:

        Private Sub selectCulture_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles selectCulture.SelectedIndexChanged

            ' Store selected language in cookie
            Localization.SetLanguage(selectCulture.SelectedItem.Value)

            'Redirect to same page to update all controls for newly selected culture
            Response.Redirect(Request.RawUrl, True)

        End Sub

Notice that you have to reload the page (redirect) in order for the language to take effect. Hope this helps.


Vicenç Masanas
Banyoles, Girona - Spain

Disgrafic.com    PSD to DNN
 
New Post
1/5/2007 7:35 AM
 
Thanks for the reply.
Here is another question:
Using DNN documents I tried to create some localized labels:
<asp:label runat="server" ResourceKey="MyLabel"/>
The label looks fine when viewed by a super user (when I logged in as host for example), but nothing is displayed for an anonymous user. The DNN just renders a empty <span> tag.

Any help is appreciated.
 
New Post
1/8/2007 11:59 AM
 
Depending on the version you are using this is a problem with cached modules. If you have a module that needs to render different content while in the view presentation you should disable caching on it (you'll find this option under module settings, set the cache time to 0).
In latest version I think this has already been solved.

Vicenç Masanas
Banyoles, Girona - Spain

Disgrafic.com    PSD to DNN
 
New Post
1/8/2007 12:03 PM
 

locale specific content caching was fixed in 3.3.x / 4.3.x i think

(although i use it on my own site as well and that seems to work fine in 3.2.2....)


Erik van Ballegoij, Former DNN Corp. Employee and DNN Expert

DNN Blog | Twitter: @erikvb | LinkedIn: Erik van Ballegoij on LinkedIn

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Provider and Extension ForumsProvider and Extension ForumsLanguage PacksLanguage PacksSwitching languages manuallySwitching languages manually


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