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 PacksLanguage depending on browser settings ?Language depending on browser settings ?
Previous
 
Next
New Post
5/10/2006 5:11 AM
 

Hi all,

Ther's contradictory information circulating on the forums about setting the default language  so I thought I'd ask again. I've read that a not logged in user's browser settings determines the language being displayed on his screen but I cannot get that to work. No matter what the browser language settings are the user is being welcomed by a page using the portal default language. What is the real story on this ?

Thanks in advance

Leif

 
New Post
5/10/2006 6:30 AM
 

I'm not sure what you mean by "contradictory information" ;)

This is how the procedure works for new anonymous visitors:

* an attempt is made to get the preferred languages array from the browser.
* in the preferred order of the array, for each language, an attempt is made to match the preferred language to an available enabled language in the portal. Partial matches are ok, so if a preferred language is fr-BE, an the portal offers an available language fr-FR, then fr-FR is selected

Mind you: after the first selection is done, this value is saved in a cookie, which will be used next time to select the language. If a cookie is available, the preffered language in the browser are not taken into account. The presedence order is this: querystring, form, cookie, browser. Mind you: only for unauthenticated users. For authenticated users the language is set to the profile language after manual or automatic logon.

In order for the process for anonymous users to work correctly, you should clear the domain cookies each time you change the browser preference, otherwise, the value of the cookie is used instead.

NB: this procedure works ok in dnn 3.2.2, earlier versions have some bugs in the selection process.

Cheers,

Erik


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

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

 
New Post
5/10/2006 8:07 AM
 

Thanks very much for your reply Erik, always very helpful.

This is a 3.2.2 install so it should work, didn't try clearing the domain cookies yet.

Cheers

Leif

 
New Post
5/17/2006 2:27 PM
 

I cannot get this to work.  I'm using DNN 4.0.2.  I've setup two languages for testing, en-EN and en-JM.  In my browser I set en-JM as my preferred language and clear the cookies.  I set a breakpoints in PageBase.PageCulture and  PageBase.SetLanguage.  When these breakpoints are hit a new language cookie has already been created and it contains en-EN! 

Question #1: What is setting this cookies??? 

If I skip over the code in PageCulture that's pulling the language from the cookies (preferredLocale = HttpContext.Current.Request("language")) and step through the remaining code it finds the correct language from the Request.UserLanguages collection.  And it set's the cookie correctly.

Question #2: What am I doing wrong and how did I get so stupid?!

Hope someone can help!

-Walter

 
New Post
5/18/2006 2:31 AM
 

did you check wether you are using the "remember me" option in the logon? (automatic logon) During automatic logon the language cookie is set in HttpModules\DNNMembership\DNNMembershipModule.vb, line 197

cheers,

erik


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 PacksLanguage depending on browser settings ?Language depending on browser settings ?


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