Default culture override

Topics: Core, Customizing Orchard, Localization
Oct 17, 2011 at 4:30 PM

Is there a way to override the default culture from being 'en-US'?

I can see some stuff in Orchard.Setup.Services.SetupService...

Any help much appreciated :)

Oct 17, 2011 at 4:45 PM

Can't you do it directly from the General Settings ?

Oct 17, 2011 at 5:07 PM

I can add a new culture and then change to it. But for my purposes this is a manual step I wish to omit...

I therefore wondered if there was an automatic way to override it in code (I don't even want 'en-US' to be a culture on my sites)

Oct 17, 2011 at 5:15 PM

Setup recipes can change any settings. Set it up through the admin, then export a recipe. That will give you the XML you need, that you can then integrate into a setup recipe.

Oct 17, 2011 at 5:44 PM

Thanks for your help guys.

I added in the following to my recipe to no avail - am I doing it wrong?

	<SiteSettingsPart SiteCulture="en-GB" />

I noticed I could use the command: "cultures set site culture en-GB"... but this doesn't work if I don't already have the culture added in my list (and I can't see a command to add cultures)

Oct 17, 2011 at 5:51 PM

Yes, the list of enabled cultures doesn't seem to be in the export. That looks like a bug. Can you file it on the issue tracker?

Oct 17, 2011 at 6:00 PM

Sure, done.


Oct 17, 2011 at 6:15 PM

Smashing ;)