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.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Change default language without showing admin translation tab


5 Posts   2053 Views


16 July 2009 at 5:14am Community Member, 271 Posts

First of all: Hi and thanks for this - at first glance - excellent framework and cms.

I read the posts about the translations pro's and con's and managed to change the default language to nl_NL with:


Is it posible to change the default language, but disable the translation tab in the admin section?


17 July 2009 at 6:50am (Last edited: 17 July 2009 7:10am), Community Member, 271 Posts

Ok, I managed to hide the translation tab by adding a rule in the function getCMSFields on mysite\code\Page.php

$fields->removeFieldFromTab("Root", "Translations");

Will hide the translationtab on all admin editpages.

I did this because I wanted to change the default language to Dutch, without showeing translation options.

Remove more tabs:
$fields->removeFieldsFromTab("Root", array('Content','Behaviour','To-do','Access','Reports','Translations'));

Maybe it is of use for someone.


This works for all tabs as expected except the Todo tab had to be called To-do instead of Todo like the tab is called.

Is this correct behaviour?


18 July 2009 at 2:37am Forum Moderator, 1091 Posts

Hi Martijn,
Translatable is meant to be used on multi-lingual sites. If you're not planning on building one and you just want to have your site properly set to Dutch, you don't have to enable Translatable, it should be enough to just set in your sapphire/_config.php:


This is supposing you're using 2.3.2. Or are you for some reason aiming on doing a multi-lingual site without translations?


18 July 2009 at 5:23am (Last edited: 18 July 2009 5:24am), Community Member, 271 Posts

No I don't... yet.

But because I could not get the dutch language files of ecommerce to work I added the rule i think...

But your right. It works without the Translatable enable...

should't this be don in mysite/_config.php?


20 July 2009 at 3:59am Forum Moderator, 1091 Posts

>> should't this be don in mysite/_config.php?

It's just that Silverstripe places its example in the sapphire/_config.php so I just thought to point you to it :-) But sure, you're right, I guess all things particular to your site should be in mysite/, so they won't get lost on upgrades...