HomeHomeUsing DotNetNuk...Using DotNetNuk...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 8:22 AM
 
Hi their,

I would like to localize just a contact page with spanish and german languague and may be in the future add dutch language to it.

I have tried all tricks but it does not seem to work. How can I make a page have multiple translation and links to the translations based on the query string?

Any sample or help will be great.

Thanks,
Wasay

http://blog.wasay.net
 
New Post
7/20/2010 8:25 AM
 
you may either use feedback module with appropriate module language packs or use an ML forms module, e.g. free Helferlein forms from www.helferlein.com

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group   European Network of DotNetNuke Professionals

 
New Post
7/20/2010 9:16 AM
 
Thanks Sebastian for the reply. I was hoping for a bit different sample or example rather than a module approach. I have a page and the resource files at:

 /Portals/0/Pages/ContactForm.aspx
/App_GlobalResources/ContactForm.resx
/App_GlobalResources/ContactForm.en-US.resx
/App_GlobalResources/ContactForm.es-es.resx

 in the ContactForm.aspx file I have a script tag with vb language which has the below code in page_load function...

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

 'Page_Load Function
displayFirstName = GetGlobalResourceObject("ContactForm", "lblFirstName")
displayLastName = GetGlobalResourceObject("ContactForm", "lblLastName")

 If (Len(displayFirstName) > 0) Then

 lblFirstName.Text = displayFirstName
 lblLastName.Text = displayLastName

End If
 **************************************

How can I get the function GetGlobalResourceObject to retrieve the correct lang value from the resx file? Based on the query string I can change the thread lang dynamically without effecting the browser language option so that a user is not involve to make or adjust anything in the browser. **************************************

'Page_PreInit function before the page_load function

 Dim lang As System.Globalization.CultureInfo

 If IsPostBack Then

 'Add logic here for query string manipulation
 lang = New System.Globalization.CultureInfo("es-es")

 Else

 lang = New System.Globalization.CultureInfo("en-US")

 End If

 System.Threading.Thread.CurrentThread.CurrentCulture = lang
 System.Threading.Thread.CurrentThread.CurrentUICulture = lang
**************************************
**************************************
 'resx file partial data value

First Name

Last Name
 
**************************************
 Any suggestions as to what I am doing wrong in this process? Thanks, Wasay

http://blog.wasay.net
 
New Post
7/20/2010 9:23 AM
 
resourcefiles are expected in App_LocalResources subfolder of your module installation folder and need to follow naming syntax, e.g. for contactform.ascx use contactform.ascx.resx and there might also be SharedResources.resx. This will localize automatically all supported controls with Resourcekey, for details you may check out Module development Localization guide from Resources > Documentation > Downloads in menu above.

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group   European Network of DotNetNuke Professionals

 
New Post
7/20/2010 12:34 PM
 
Thanks,

The issue is this is not a module, this is a independent custom page which is posting to a support ticketing system by utilizing iframe.

It's more like it can be treated as asp.net page rather than dotnetnuke but it's receding in the web.config settings of dotnetnuke..

The page does not have dotnetnuke master page (skin) or any of the dotnetnuke imports, it's a page on it's own and I am just wondering if web.config is the reason where I cannot read the resx file.

It seems to be able to read the App_GlobalResource file only issue is that it's null values.

Do I have to compile something after adding resx files to App_GlobalResources?

Thanks,
Wasay

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


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

Attend A Webinar
Free Demo Site
Download DotNetNuke Professional Edition Trial
Have Someone Contact Me
Have Someone Contact Me
DotNetNuke Store

Like Us on Facebook Join our Network on LinkedIn Follow DNN Corporate on Twitter Follow DNN on Twitter

Advertisers

DotNetNuke DNN Hosting
Exact Target Exec Alert
r2integrated

DotNetNuke Scoop!

Sponsors

DotNetNuke Corporation

DotNetNuke Corp. is the steward of the DotNetNuke open source project, the most widely adopted Web Content Management Platform for building web sites and web applications on Microsoft. Organizations use DotNetNuke to quickly develop and deploy interactive and dynamic web sites, intranets, extranets and web applications. The DotNetNuke platform is available in a free Community and subscription-based Professional and Enterprise Editions with an Elite Support option. DotNetNuke Corp. also operates the DotNetNuke Store where users purchase third party apps for the platform.