Re: How to force MOSS to create My Sites using the same language as the Portal site collection?
- From: "Michael Herman \(Parallelspace\)" <mwherman@xxxxxxxxxxxxxxxxx>
- Date: Mon, 27 Aug 2007 13:28:07 -0400
<DANGER TYPE=HIGH TEXT="You really shouldn't try this at home (or at work)">
Here's some javascript I added to the top of the PlaceHolderMain content
placerholuder in the layouts\MySite.aspx page. Usual caveats about this
breaking as soon as you install a Service Pack, being totally unsupported,
etc.
Pre-requisites:
1. MOSS multilanguage pack(s) need to be installed. This script only
supports 1033 English installed with 1036 French.
2. Looks for the word "portail" anywhere in the URL and limits French users
to creating only French My Sites. English users have the original choices
of English or French.
3. Multiple language selection needs to be turned on the the My Site
configuration page.
---------------- MySite.aspx ----------------
<asp:Content contentplaceholderid="PlaceHolderMain" runat="server">
<script language="javascript">
// C:\Program Files\Common Files\Microsoft Shared\Web Server
Extensions\12\TEMPLATE\LAYOUTS\MySite.aspx
var timerNBEDDisableControls = null;
var iQLTAttempts = 0;
function DoNBEDDisableControls()
{
try {
iQLTAttempts++;
if (iQLTAttempts <= 5) {
if (true /*
window.document.all.ctl00_PlaceHolderMain_ddlLanguages.disabled != true */)
{
//window.document.all.ctl00_PlaceHolderMain_ddlLanguages.disabled =
false;
var iValue;
var sHostname = window.location.toString();
if (sHostname.indexOf("portail") != -1) { // French
window.document.all.ctl00_PlaceHolderMain_ddlLanguages.outerHTML =
"<select name=ctl00$PlaceHolderMain$ddlLanguages
id=ctl00_PlaceHolderMain_ddlLanguages accesskey=L class=ms-long
Title=Language:>"
+ "<option selected=selected value=1036>French</option>"
// debug + "<option value=1033>" + sHostname + "</option>"
+ "</select>";
}
else { // English
// Leave the English user with both options (default)
}
//window.document.all.ctl00_PlaceHolderMain_ddlLanguages.disabled =
true;
}
}
else {
// make sure we clear the timer
}
clearNBEDDisableControlsTimer();
}
catch( eIgnore )
{
}
}
function setNBEDDisableControlsTimer()
{
timerNBEDDisableControls = window.setTimeout(DoNBEDDisableControls, 100,
"JScript");
}
function clearNBEDDisableControlsTimer()
{
if (timerNBEDDisableControls != null)
{
window.clearTimeout(timerNBEDDisableControls);
}
timerNBEDDisableControls = null;
}
setNBEDDisableControlsTimer();
</script>
----------
</DANGER>
"Michael Herman (Parallelspace)" <mwherman@xxxxxxxxxxxxxxxxx> wrote in
message news:OQJng$K6HHA.3400@xxxxxxxxxxxxxxxxxxxxxxx
Context
We're supporting a French portal site collecton and an English portal site
collection in the same farm (with the MOSS multi-language pack installed).
French uses only have access to the French portal; English, to the English
portal.
We want to force newly created My Sites to be created with the same
language as the portal site collection that a particular user has access
to. We don't need to worry about duplicate French and English My Sites
being created.
MOSS can be enabled to support multi-language My Sites ...but the user is
given the choice of language the first time they try to access their My
Site. We don't want this ...we want the My Site to be forced to use the
language of the parent portal site collection.
Questions
1. What approaches are there for forcing a newly created My Site to use
the language of the parent portal site collection?
Michael.
.
- References:
- How to force MOSS to create My Sites using the same language as the Portal site collection?
- From: Michael Herman \(Parallelspace\)
- How to force MOSS to create My Sites using the same language as the Portal site collection?
- Prev by Date: Re: cant access the portal from my box
- Next by Date: Re: Cannot map drive to Sharepoint Document Library - System error 67
- Previous by thread: Re: How to force MOSS to create My Sites using the same language as the Portal site collection?
- Next by thread: Re: How to force MOSS to create My Sites using the same language as the Portal site collection?
- Index(es):
Relevant Pages
|
Loading