Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Data Model Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Translatable extension issue

Go to End

3 Posts   1161 Views


Community Member, 12 Posts

22 August 2011 at 12:21pm

Hi there,

I am building a site which will have en_NZ as the default language, but will have some different content for the UK and AUS versions of the site (and other countries in the future).

I have started this internationalisation process by enabling the Translatable extension by adding the following code to my _config.php:

//add translatable extensions
Object::add_extension('SiteTree', 'Translatable');
Object::add_extension('SiteConfig', 'Translatable');

// Set the site locale

I THEN saw the warning on this page about setting the appropriate default language for your content BEFORE building the database with Translatable enabled.

Have I screwed up massively?

In the CMS, the default language for all existing and new pages appears to be 'English (US)', which I don't want as the default.

How can I correct this?

Thanks in advance


Community Member, 12 Posts

22 August 2011 at 12:45pm

Also, I did have the correct NZ locale set before I added the Translatable extension, I think I just put the extension code in the wrong place.

So my HTML element USED to be:

<html xmlns="" lang="en-NZ" xml:lang="en-NZ">

Since adding the Translatable extension, it is:

<html xmlns="" lang="en-US" xml:lang="en-US">

Any help to get all my existing content back to being NZ language would be greatly appreciated!


Community Member, 12 Posts

23 August 2011 at 8:54am

OK, looks like it may be sorted now. I commented out the translatable extension, re-built, and then un-commented it. I also had to create NZ versions of all of my pages one by one (only about 35 pages). But now it seems to be defaulting to NZ at least.

One thing that made it seem worse than it actually was was that I had top-level redirect pages linking to sub pages. When I had created NZ language versions of a section, the redirector wasn't automatically going to the correct child page, it was still linking to the child page of the US version. Something to watch for.