వాడుకరి భాష కోసం అధికారిగా MOSS వాడుకరి ప్రొఫైల్

నా ప్రస్తుత ప్రాజెక్ట్, వినియోగదారుల ప్రపంచవ్యాప్తంగా ప్రయాణం మరియు వారు విభిన్న గమ్యస్థానాలకు వద్ద వచ్చినప్పుడు, use whatever machine is handy at the time. Those guest machines will be running Windows and installed and configured for the local locale. (I’ve just realized that the guest machines may not have the right language packs… probably won’t, నిజానికి… I’m parking that one for now).

SharePoint needs to provide a mechanism whereby the user can pick their preferred language and then have MOSS honor that language regardless of how the user accesses MOSS. In other words, disregard whatever the browser tells IIS/MOSS and instead look up that preferred language and use it.

We’re going to investigate two approaches:

  1. HTTP Handler: A custom HTTP handler installed on IIS will look up the user’s MOSS profile, figure out the preferred language and then switch the HTTP header around as needed before passing control to MOSS.
  2. global.asax: Modify global.asax to do the same thing. We may modify something else, but the idea is that we find some place where we can insert our locale-switching logic.

The other complicating factor is that we need to support 60k users, గురించి 1,000 of which may be simultaneously accessing MOSS at peak load.

The HTTP handler seems pretty drastic, but possibly the best place to put the code since it’s at the IIS level and all-knowing. It’s a good single point of work.

We’re leaning toward a global.asax type approach, mainly because we believe we’ll have more options for caching data at that point.

I’ll be blogging more on this subject as I learn more.

If you have know anything about this, please post a comment 🙂

</చివర>

నా బ్లాగ్ సబ్స్క్రయిబ్.

వద్ద ట్విట్టర్ లో నన్ను అనుసరించండి http://www.twitter.com/pagalvin

4 "న ఆలోచనలువాడుకరి భాష కోసం అధికారిగా MOSS వాడుకరి ప్రొఫైల్

  1. జాప్ Vossers

    I have not tested this so I am not sure if it works.

    The Page class has an InitializeCulture() method which can be overridden. If you do this in the code behind of your custom masterpage, you could do something along the lines of:

    protected override void InitializeCulture()
    {
    // override virtual method InitializeCulture() to check if profile contains a user language setting
    string UserCulture = GetCultureFromUserProfile();
    అయితే ( UserCulture != "")
    {
    // there is a user language setting in the profile: switch to it
    Thread.CurrentThread.CurrentUICulture = new CultureInfo(UserCulture);
    Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(UserCulture);
    }
    }

    Obviously you can build some caching into the implementation of this method.

    ఆధారము: http://quickstarts.asp.net/QuickStartv20/util/srcview.aspx?path=~/aspnet/samples/localization/LocalizePers.src&file=LocalizePers_cs\LocalizePers_cs.aspx&lang=C# source

  2. జోనాథన్

    I’m thinking HTTP handler with the following flow:

    1. Request comes in, check cookies for a session cookie for language preference (session cookies expire when the browser is closed)
    2. Check if request is for ASPX page, if not, skip request
    3. If cookie exists, set the language header to the value specified. You are done!
    4. No cookie, take the authentication credential and look the user up in SPS, find language preference
    5. Set cookie header and HTTP language header. Done.

    First APX page request will have overhead of SPS lookup but every request from then on with have no lookups so will be native speed. No need for session cache or any other overhead by using a session cookie too. Once the browser is closed, the session cookie goes away. If the user changes their languages preference in SPS they just need to close and re-open the browser for it to take effect.

  3. డేనియల్

    I would be more inclined to use a HTTPHandler, the only reason is that I don’t like touching the SharePoint files. Plus it’s easy to create a SharePoint solution to deploy a HttHandler ( and use the SPWebConfig API’s to modify the web.config). Having the user load you do, I’d imagine you have a sizable farm, you really don’t want to go modifiying files on each server.
    Deploying the global.asa file via a solution is a bad idea, if you retract it, your original file is gone
    Also having the ability to retract the solution quickly might be a good idea, in case things go wrong with the perf of the handler.

ఒక Reply వదిలి

మీ ఇమెయిల్ చిరునామా ప్రచురితమైన కాదు. లు గుర్తించబడతాయి *