SPWeb.Locale returns a
CultureInfo<http://msdn.microsoft.com/EN-US/library/kx54z3k7>object,
so you should be able to pass the
LCID<http://msdn.microsoft.com/EN-US/library/system.globalization.cultureinfo.lcid>property
from this straight into the add method.

eg:

siteCollection.Add("foo", "foo", "bar", siteCollection.RootWeb.Locale.LCID);



On Wed, Jun 15, 2011 at 12:10 PM, Paul Noone <
[email protected]> wrote:

> OK. Almost there using siteCollection.RootWeb.Locale but now I’m having
> trouble with converting the value.
>
>
>
> The following will build without error but just looks plain wrong. Does
> anyone know what type of field I’m dealing with?
>
>
>
> //Inherit LCID from parent
>
> string LCID = siteCollection.RootWeb.Locale.ToString();
>
> uint webLCID = Convert.ToUInt32(LCID);
>
>
>
> Regards,
>
> Paul
>
>
>
> --
>
> Online Developer/SharePoint Administrator,
> ICT Infrastructure Team
> *CEO Sydney*
>
>
>
> *From:* [email protected] [mailto:[email protected]] *On
> Behalf Of *Paul Noone
> *Sent:* Wednesday, 15 June 2011 11:13 AM
> *To:* ozMOSS ([email protected])
> *Subject:* SPWebCollection Add Method
>
>
>
> Hi all,
>
>
>
> I’m trying to provision a subsite using this method and am stuck on the *
> nLCID* parameter.
>
>
>
> The API states a 32-bit GUID is required but I can’t find one! J
>
>
>
> I want to inherit from the parent Site which uses English-AU but am not
> sure if I’m getting it properly.
>
>
>
> Will the following work?
>
>
>
> if (currentPublishingSite.IsRoot)
>
> {
>
> using (SPSite siteCollection = new SPSite(SPContext.Current.Web.Url))
>
> {
>
> using (SPWeb web = siteCollection.OpenWeb())
>
> {
>
>                   //Inherit LCID from parent
>
>                   uint webLCID = SPSite.Language;
>
>                   // webUrl, Title, Description, LCID, Template,
> UniquePerms, bConvertIfThere
>
>                   using (SPWeb newSite = siteCollection.RootWeb.Webs.Add(
> "AboutUs", "About Us", "More information about this site.", webLCID,
> _siteTemplateNamePrefix, false, false))
>
>                   {
>
>                         // Perform additional customisations here
>
> }
>
>             }
>
>       }
>
> }
>
>
>
>
>
> Kind regards,
>
> Paul Noone
>
>
>
> ---------------------------------------------------
> Online Developer/SharePoint Administrator
>
> Infrastructure Team, ICT
> Catholic Education Office, Sydney
> p: (02) 9568 8461
>
> f: (02) 9568 8483
> e: [email protected]
> w: http://www.ceosyd.catholic.edu.au/
>
>
>
> _______________________________________________
> ozmoss mailing list
> [email protected]
> http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss
>
>
_______________________________________________
ozmoss mailing list
[email protected]
http://prdlxvm0001.codify.net/mailman/listinfo/ozmoss

Reply via email to