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.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

i18n cant set german as a language

Go to End

5 Posts   3533 Views


Community Member, 5 Posts

17 March 2009 at 7:47pm

Hi I am fairly new to this so i might hve overlooked something but anyhow. I am trying to tell my site that it should use de_DE (german) as a language. As far as I understand I have to enable i18n in mysite/_config.php and also I have to tell silverstripe there which language to use. So i did exactly that. After I flushed teh cache i still got all the messages ie. in my gallery in english. So i checked wethere there was a language file availiable. That turned out positive. So how and where do I have to tell silverstripe to use german as a language ?


Community Member, 6 Posts

14 May 2009 at 12:20am

Wondering about the exact same thing. How can I effectively switch my Silverstripe website to German?


Community Member, 127 Posts

17 May 2009 at 4:23pm

Your problem descriptions are not 100% clear about what you actually see in German, and thus I have to assume you see some stuff in German, but other stuff not, despite a language file being present.

This looks like the issue I ran into earlier, see her for a description and workaround for such missing translations despite language file being present.

But before you go through all templates now and apply the workaround, there is a bug ticket and a patch already, which solves this more elegantly, because with much less work. However it will probably be not included in 2.3.2, so you might need to repatch once you upgrade. Here's the forum discussion about it and here's the ticket with patch for fixing i18n in templates included by templates.



Community Member, 127 Posts

17 May 2009 at 4:28pm

... and just in case you would have forgotten that: set your locale in your mysite/_config.php with i18n::set_locale('...') after enabling i18n.


Community Member, 37 Posts

5 May 2010 at 7:09pm

Edited: 18/05/2010 8:13pm

For multiligual websites you need to add

if($this->dataRecord->hasExtension('Translatable')) {

in Page.php -> class Page_Controller -> public function init() to use _t() function in templates.

For the gallery module:
I've created a translation for the gallery module version 0.2.2 (, so that all backend fields and also some outputs in the templates like "Next", "Previous" and so on use the language files in a lang directory (currently english and german)

If needed, send me a message