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...Localize just a contact page with resx filesLocalize just a contact page with resx files
Previous
 
Next
New Post
7/20/2010 3:40 PM
 
DotNetNuke does not support ASP.Net localization, this is turned off in web.config, because it conflicts with DNN localization. I remember however a project by Brandon Haynes on Codeplex, how to enable ASP.Net localization in DNN. IMHO the easiest way might be either using a different application folder for your solution or just converting your pages into a DNN module.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
7/20/2010 3:52 PM
 
Thanks Sebastian,

May be I do need to convert this one page into its own module.

I do not want to take the risk of messing up the default localization but I will first check out the codeplex and try my luck.

Thanks,
Wasay

http://blog.wasay.net
 
New Post
7/20/2010 4:37 PM
 
Solution:

Got the hint from post of David Pugmire at 
http://www.dotnetnuke.com/tabid/795/forumid/78/postid/16911/scope/posts/default.aspx

To resolve the url... I have used the resolve url before but may be it was just the think that was not working for me today lolz

The localization files are in "/App_LocalResources/" with extension "ContactForm.ascx.resx" and "ContactForm.ascx.es-ES.resx"

Actual page is in "/Portals/0/Pages/ContactForm.aspx"

***************************************
	Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
		
		Dim lang As System.Globalization.CultureInfo
		Dim langSetDefault As Boolean
				
		langSetDefault = False		

		'Add query string logic
		Dim qsLang As String
		qsLang = Request.QueryString("lang")
		If (Len(qsLang) > 0) Then
			If (qsLang = "spanish") Then
				lang = New System.Globalization.CultureInfo("es-ES")
			ElseIf (qsLang = "german") Then
				lang = New System.Globalization.CultureInfo("de-DE")
			ElseIf (qsLang = "dutch") Then
				lang = New System.Globalization.CultureInfo("nl-BE")
			Else
				langSetDefault = True
			End If				
		Else
			langSetDefault = True
		End If
		
		If (langSetDefault = True) Then
			lang = New System.Globalization.CultureInfo("en-US")
		End If
		
		System.Threading.Thread.CurrentThread.CurrentCulture = lang
		System.Threading.Thread.CurrentThread.CurrentUICulture = lang

	End Sub
    Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)

		lblAboutYourself.Text = Localization.GetString("lblAboutYourself.Text", ResolveUrl("~/App_LocalResources/ContactForm"))
		lblFirstName.Text = Localization.GetString("lblFirstName.Text", ResolveUrl("~/App_LocalResources/ContactForm"))
		
    End Sub 'Page_Load
With link href "?lang=english" "?lang=spanish"....
***************************************

I am still working on this and may need to rename file names for other reasons...

Thanks Sebastian for your suggestions as well :)
It has been a great day even though the first half was frustrating :D

Thanks,
Wasay

http://blog.wasay.net
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...Localize just a contact page with resx filesLocalize just a contact page with resx files


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