Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm having problems setting the title of a root web in a site collection when creating it in an other language then English. When i run the script under using 1033, it works fine the site title is set to the input. But then I change to 1044 Norwegian I get no error but the title is empty (I have installed the language package). Here is the script (I'm using a custome site definition, but set it to STS#0 in the example same problem):

    Write-Host "******** Create site. ***********" -f Green
    Write-Host "Please enter the URL and the administrator of the site to create" -f Green
    [console]::ForegroundColor = "yellow"
    $newSiteUrl = Read-Host "Please enter the site Url to for the site"
    $siteAdministrator = Read-Host "Please enter the site administrator"
    $webTitle = Read-Host "Please enter the title of the root"
    [console]::ResetColor()


    $site = New-SPSite $newSiteUrl -OwnerAlias $siteAdministrator -Language 1044
    $web = $site.RootWeb 
    $web.ApplyWebTemplate("STS#0")
    $web.Title = $webTitle
    $web.Update()
    Write-Host "The Installation is complete please visit the site at" $web.URL -f Green

So how can I set the title of a site using an other language then English?

share|improve this question
    
Are you using any special characters in the Norwegian title? –  Anita Boerboom Jun 9 '11 at 11:05
    
No I@m trying to name it Norge –  gaotter Jun 9 '11 at 12:33
add comment

1 Answer 1

up vote 2 down vote accepted

Why do it in 2 steps? The New-SPSite cmdlet takes a webtemplate and a title parameter too?

share|improve this answer
    
Hi thank you I did not find any parameter called Title. But the -Name parameter worked. The template is a custome one so I have to add i after the web is created. But when using 1033 I do not need to use the -Name parameter the $web.Title works. I will probebly get problems with it if I need to add sub webs. –  gaotter Jun 9 '11 at 12:35
    
-Name is the same as Title –  Anders Rask Jun 9 '11 at 12:52
    
If the webtemplate is installed, there should be no problem using it. Check Get-SPWebTemplates | Select Name and just paste in the Name value. For Custom Web template that would be something like {guid}#YourTemplate –  Anders Rask Jun 9 '11 at 12:54
    
@Anders I tryed that but never got it to work. But then I found this blog mkdot.net/blogs/darko/archive/2011/02/17/… and was able to set the template. But why does not SPWeb.Title work?? Lets say I whant to create a sub site, I can't do that using SPSite? –  gaotter Jun 9 '11 at 13:07
    
Just tryed creating a sub site using New-SPWeb and the -Name parameter worked. Seems like the is somthing strage with the $web.Title and languages. –  gaotter Jun 9 '11 at 13:23
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.