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.

Archive

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Multi-lingual contents for dummies (real dumb) please!


Reply

784 Views

Avatar
kudesign

17 November 2008 at 1:03pm Community Member, 64 Posts

I have been searching for some simple steps to get a multi-lingual site started, but no luck at this stage. I am trying to setup English and Mandarin Chinese on a test site:

This is what I have done so far, please help by adding to the steps:

Step 1: mysite/_config.php - added in

i18n::enable();

Step 2: ran database build - http://<mysite>/db/build

Step 3: Making DataObjects translatable

class Team extends DataObject {
static $db = array(
"Name" => "Varchar",
"FoundedDate" => "Date",
"Description" => "Text",
);

// we don't want all fields to be translated (wouldn't make sense for a date, right?)
static $extensions = array(
"Translatable('Description')"
);
}

Step 4: When I log-in to SS cms, I can see 'translation' tab, and a language selection drop down menu. I translated the my site Navigation menus into Mandarin, saved/published, and it previewed ok, but my site defaults to the Mandarin language, and not English. I had to select back to 'English' in the CMS, and refresh my browser to get it back to English content...

Step 5: Not sure what to do next? i tried to call: http://<mysite>/mypage/?lang=tw but it doesn't work... the language selector widget looks like it is for blogging only? what do i have to do for ?lang=tw/?lang=en to work? please help!