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, get current cultureLocalization, get current culture
Previous
 
Next
New Post
3/12/2007 10:02 PM
 
I know I must be missing something here, but what is the code needed to get the current culture for this current page request.  I am looking at implementing a caching mechanism for my module that supports full localization....

C# code would be the best if possible!

-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
3/16/2007 7:45 AM
 

Hi Mitchel,
dont know if this is what your looking for?

System.Threading.Thread.CurrentThread.CurrentCulture.Name

This way you get the current locale.... en-US for example.

Regards,
Paul

 
New Post
3/16/2007 9:49 AM
 
Hi Michel,

The current culture is assigned at pagebase.vb on line 230. You can reference it by Thread.CurrentThread.CurrentCulture and Thread.CurrentThread.CurrentUICulture. Check google for an explanation of the differences between these two, if you don't know already.

You can get a localized string from a resource file via DotNetNuke.Services.Localization.GetString, or by using the .net 2.0 strongly-typed resource class at Resources.(ResourceName).

Hope this helps!

Brandon Haynes
BrandonHaynes.org
 
New Post
3/16/2007 11:50 AM
 

Yes, that helps...I just forgot the command...

I need it to perform culture specific data caching......so that should work perfectly!


-Mitchel Sellers
Microsoft MVP, ASPInsider, DNN MVP
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Performance Tips, DNN Consulting Quotes, and DNN Technical Support Services
 
New Post
4/11/2010 7:11 AM
 
But how do you access the current culture of the portal? I am calling a web service that resides in DotNetNuke via IWebLite and it knows my ID, what module and tab I am currently on, but it does not pick a change in the culture when I change the language by clicking on the language bar. All I get is my System culture info.
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Localization, get current cultureLocalization, get current culture


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