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...How do I get a list of supported locales for a portalHow do I get a list of supported locales for a portal
Previous
 
Next
New Post
2/3/2010 7:13 AM
 

 Is there a function within DNN to return a list of all supported locales for a particular portal?

I have looked at the PortalInfo and PortalSettings objects, but can't see an obvious list.

Is there another way?


Blue & White hooped blood runs through my veins!
 
New Post
2/5/2010 5:51 AM
 

 ** POP **

Obviously this isn't as simple as I first thought seeing that this thread has been read nearly 50 times and so far no one has been able to suggest a way of doing this.

I find this surprising, but I guess this has never been required before.

I guess I am going to have to write my own code based on what is used in the Admin -> Languages page.


Blue & White hooped blood runs through my veins!
 
New Post
2/5/2010 5:58 AM
 

supahoopsa,

u you use Localization.GetLocales(PortalId). If you pass in a Null.NullInteger as portal id, you'll get all installed languages, if you pass in the actual portal id, you will get the enabled ones for this portal

 


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

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

 
New Post
2/5/2010 6:08 AM
 

 Thanks Eric, this is what I was looking for.

However, I can only find Localization.GetSupportedLocales() in v4.9.4 and this method doesn't seem to accept a PortalID.

Maybe a bit more background is required so that my requirement is understood.

 

I am code a Single-Sign-On (SSO) to our portals using SAML 2.0. Part of the requirement is that if the user doesn't already exist in the portal a profile will automatically be created for the user based on the credential supplied as attributes within the SAML token. One of the attributes is a Culture code and what I want to do is validate this code against the supported locales of the portal I am going to direct the user to. So at the point of validation, I am NOT already logged into the portal, so I don't think Localization.GetSupportedLocales() will work.

Hope this makes sense.

So any suggestions?

 


Blue & White hooped blood runs through my veins!
 
New Post
2/17/2010 8:24 PM
 

Did you get this solved? I'm working off of v4.9.2 so I imagine you should have this method.

I'm up against the same thing and I've used:

DotNetNuke.Services.Localization.Localization.GetLocales(settings.PortalId)

to get the collection of locales into a dictionary object. But so far when I iterate through the collection I only get de-DE (my second Locale) and not en-US (the default). That's another story I guess.  It doesn't seem to be really grabbing all locales .. unless, since it's not the primary portal on the site the en-US is listed with a different portal ... hmmmm.

Anyhow, if you solved this, I'd be interested.  Or if you think I'm getting somewhere that you haven't let me know.


/Brian C
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Language and In...Language and In...How do I get a list of supported locales for a portalHow do I get a list of supported locales for a portal


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