HomeHomeUsing DotNetNuk...Using DotNetNuk...Language and In...Language and In...System Default LanguageSystem Default Language
Previous
 
Next
New Post
5/29/2012 6:46 AM
 

Hello!

    I read in another post that system default language must be en-US. I did some digging and found that this is because the system default language is hard-coded in many methods and class members, including  Localization class member SystemLocale.

Now I have the following problem: I've upgraded my site to DNN 6.1.5. Site works fine, but: I wanted to export the site template to create a subportal and clone the site, and noticed that the choose site dropdown didn't populate. It turns out that this is because the GetPortals stored procedure needs a cultureCode parameter, which is always en-US. Below is the method that should return the list of portals so I can choose which to export.

public ArrayList GetPortals()
        {
            string cultureCode = Localization.SystemLocale;
            string cacheKey = String.Format(DataCache.PortalCacheKey, Null.NullInteger, cultureCode);
            var portals = CBO.GetCachedObject<List<PortalInfo>>(new CacheItemArgs(cacheKey, DataCache.PortalCacheTimeOut, DataCache.PortalCachePriority, cultureCode),
                                                    GetPortalsCallBack);
            return new ArrayList(portals);
        }

Notice the line in bold.

Now here is that property in Localization class:

public static string SystemLocale
        {
            get
            {
                return "en-US";
            }
        }

So the problem is that all of my portals have en-GB culture, whereas the parameter is always en-US for the GetPortals method. Is there a workaround for this?

 
New Post
5/29/2012 7:02 AM
 
I think, you are misunderstanding sth. system default language is used for cache to specify "neutral" language for cached items. This is not related to UI elements.

Cheers from Germany,
Sebastian Leupold (DotNetNuke MVP)

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

 
New Post
5/29/2012 8:13 AM
 
Hi Sebastian, thanks for the reply. The thing is, when I changed the stored procedure to return the portals that have en-GB as culture code, the portal dropdown list populated without problems. This is why I checked where this stored procedure is called when clicking export site, and I found what I initially posted.
 
Previous
 
Next
HomeHomeUsing DotNetNuk...Using DotNetNuk...Language and In...Language and In...System Default LanguageSystem Default Language


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
Start  Professional Edition Trial
Have Someone Contact Me

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

Advertisers

Sponsors

DotNetNuke Corporation

DotNetNuke (DNN) provides a suite of solutions that make designing, building and managing feature-rich sites and communities fast, easy and cost-effective. The DotNetNuke Platform CMS is the foundation for more than one million websites worldwide. DNN Social, our newest solution, enables businesses to create immersive, interactive communities. Thousands of organizations like True Value Hardware, Bose, Cornell University, Glacier Water, Dannon, Delphi, USAA, NASCAR, Northern Health and the City of Denver have leveraged DNN to deploy highly engaging business- critical websites. Our rapid growth in product sales and deployments resulted in DotNetNuke Corp. being named one of the fastest growing private companies in America by Inc. Magazine in 2011 and 2012.