4952 Posts in 14081 Topics by 1491 members
|Go to End|
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 ?
14 May 2009 at 12:20am
Wondering about the exact same thing. How can I effectively switch my Silverstripe website to German?
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.
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.
5 May 2010 at 7:09pm Last edited: 18 May 2010 8:13pm
For multiligual websites you need to add
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 (http://doc.silverstripe.org/modules:gallery), 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
|Go to Top|