7 February 2009 at 2:30am
I tried that as well. It produced a different kind of error.
I was able to find a solution by using parts of the [url=http://doc.silverstripe.com/doku.php?id=recipes:multilingual_content]Multilingual Content[/url] recipe. I used two parts of step two. The first code block was used, I skipped the custom class "MultiLingual" entirely, and in the third block, I changed "$lang = MultiLingual::currentLang();" to "$lang = Translatable::current_lang();". The last step was to make sure my French custom field names ended in '_fr'.
From what I've found in my research here, it seems like quite a hack job to try and have a multilingual web site when it comes to custom fields in classes. Unless, of course, I'm doing something terribly wrong.
Is there a way to display custom includes evaluating the current language?
I find this very difficult to do, and since i'm not a programmer, all that i've tried was messing up the layout or giving me errors...
If anyone can post here a way to evaluate the language inside the .ss files to include another, that would be great !