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.

All other Modules /

Discuss all other Modules here.

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

how to correctly install translatable

Go to End

7 Posts   3138 Views


Community Member, 5 Posts

18 November 2012 at 8:22pm

I am following the instructions for installing the translatable module from github, using the latest master from the repository:

I do not understand this section:

Through $extensions

class Page extends SiteTree {
static $extensions = array(

where is this supposed to go?

If I do not add it, I can install translatable but clicking on the "Create" translation page does nothing.

any hint appreciated,



Forum Moderator, 1391 Posts

19 November 2012 at 12:58am

Hi Kochnab2,
First of all: ignore the :::php bit: this is a directive for the sintaxhighliter in the docsviewer application, that doesn't work on GitHub.

The translatable module is basically an extension (decorator) that you have to enable for it to work. As the helpfile says: there are more ways to do this, but it's 'either or', not 'and'. So adding this to your mysite/_config.php file should do the trick:

Object::add_extension('SiteTree', 'Translatable');
Object::add_extension('SiteConfig', 'Translatable');

Mind to do a /dev/build?flush=1 afterwards. The fact that you can create a translation Seems to indicate that the module is installed, so something else is going wrong. You say create translation does nothing. Do you get any errormessage? What version of SilverStripe are you using?


Community Member, 5 Posts

13 December 2012 at 3:35am

Thank you very much,
I am using silverstripe 3.0.2, I tried upgrading to 3.0.3 but I get some issues in the backend, so prefer to stick with 3.0.2.
I made the changes to the _config file,

First I got this error:

PHP Fatal error:  Call to undefined method MySQLDatabase::isSchemaUpdating() in /data/www/cosmo3/silverstripe-translatable/code/model/Translatable.php on line 1201

so I commented that line out and the extension seem to be installed.

But in the backend, in the "Translations" tab,
when I click on the "Create" button to create a translation, nothing happens and I get no errors, I activated also the error log, but that shows nothing as well.

Any help appreciated. Thanks.


Community Member, 5 Posts

13 December 2012 at 3:46am

I think I found the problem,
it looks like the "Create" button has the "name" attribute: action_createtranslation

which is defined in:


but this javascript file is not included in the backend page,
do you know how to fix this?


Community Member, 267 Posts

14 December 2012 at 2:16am

Edited: 14/12/2012 2:18am

im having the same problem on 3.02 with the latest translatable module... uploaded it under the name: translatable...
ran a dev/build?flush=1..

got error during dev/build..

Fatal error: Call to undefined method MySQLDatabase::isSchemaUpdating() in /url/translatable/code/model/Translatable.php on line 1201

now upgrading to 3.03 and see what happens..


Community Member, 5 Posts

14 December 2012 at 8:54am

yeah, if you comment that line out it looks like the install works, but then the javascript scripts are not included correctly in the backend.
Is anybody maintaining this module?


Community Member, 6 Posts

9 January 2013 at 9:31am

Edited: 30/01/2013 2:17am


Decompress your module and rename silverstripe-translatable-master to translatable.

Follow install process inspired of

In your mysite/code/Page.php

class Page extends SiteTree {
static $extensions = array(
some code ...

And add this line in your _config.php

//My exemple is for website translate in 3 languages
Object::add_extension('SiteTree', 'Translatable');
Object::add_extension('SiteConfig', 'Translatable'); // 2.4 or newer only
'en_GB', //UK English
'nl_NL', //Ducth
'fr_FR' //French

Have a lot of fun ;)

The translation module is definitely not working or just simply page!

My error in the jquery notice in backend is :
Error Line 580 ../framework/model/MySQLDatabase.php

An Sql Error?... Just for

I can do some dev / build... nothing works...

I created a new PageType ContactPage with the code follow :

class ContactPage extends Page {

static $db = array(

public function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab("Root.SoumissionForm", $myMailTo =new TextField('Mailto', 'Email du destinataire '));
$fields->addFieldToTab("Root.SoumissionForm", $mySubmitText = new TextareaField('SubmitText', 'Texte du mail'));

$fields->addFieldToTab("Root.Coordonnees", $myNom = new TextField('Nom', 'Raison Sociale'));
$fields->addFieldToTab("Root.Coordonnees", $myAdresse = new TextField('Adresse', 'Adresse'));
$fields->addFieldToTab("Root.Coordonnees", $myVille = new TextField('Ville', 'Ville'));
$fields->addFieldToTab("Root.Coordonnees", $myCP = new TextField('CP', 'Code Postale'));
$fields->addFieldToTab("Root.Coordonnees", $myRegion = new TextField('Region', 'Région'));
$fields->addFieldToTab("Root.Coordonnees", $myPays = new TextField('Pays', 'Pays'));
$fields->addFieldToTab("Root.Coordonnees", $myPhone = new TextField('Phone', 'Téléphone'));
$fields->addFieldToTab("Root.Coordonnees", $myGPS = new TextField('GPS', 'Coordonnées GPS : Latitude,Longitude'));

$translation = $this->getTranslation(Translatable::default_locale());

if($translation && $this->Locale != Translatable::default_locale()) {

$transformation = new Translatable_Transformation($translation);


return $fields;

class ContactPage_Controller extends Page_Controller {

public function init() {



If someone have an idea to create and traduce a new type of page.

I'm really desperate... one month to work for nothing, my client project is on standby... what has become my favorite SS version 2.4.5...