<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Forum posts to 'Showcase'</title>
		<link>http://www.silverstripe.com/showcase-forum/</link>
		

		
		<item>
			<title>Re: Wisa.nl</title>
			<link>http://www.silverstripe.com/showcase-forum/show/59870?showPost=133658</link>
			<description>&lt;br /&gt;Of course! Thank you, will try that, even if the problem is solved by hacking ContentController and SiteTree (for MetaTitle). &lt;br /&gt;&lt;br /&gt;This I guess is a cleaner way to do it since the way I have done it now would impose a problem when upgrading.&lt;br /&gt;&lt;br /&gt;Thanks again!&lt;br /&gt;&lt;br /&gt;/PO&lt;br&gt;&lt;br&gt;Posted to: Wisa.nl</description>
			<pubDate>Sat, 02 Aug 2008 00:35:46 +1200</pubDate>
			<author>P-O Blomstrand</author>
			<guid>http://www.silverstripe.com/showcase-forum/show/59870?showPost=133658</guid>
		</item>
		
		<item>
			<title>Re: Wisa.nl</title>
			<link>http://www.silverstripe.com/showcase-forum/show/59870?showPost=133606</link>
			<description>Hmm..&lt;br /&gt;&lt;br /&gt;Make sure the function is in your Page class , not in your page_controller .....&lt;br /&gt;&lt;br /&gt;&lt;br&gt;&lt;br&gt;Posted to: Wisa.nl</description>
			<pubDate>Fri, 01 Aug 2008 21:31:57 +1200</pubDate>
			<author>Lars Prakken</author>
			<guid>http://www.silverstripe.com/showcase-forum/show/59870?showPost=133606</guid>
		</item>
		
		<item>
			<title>Re: Wisa.nl</title>
			<link>http://www.silverstripe.com/showcase-forum/show/59870?showPost=133021</link>
			<description>&lt;br /&gt;Really don't understand that because I actually &quot;copied&quot; your code, including functions for Title and MenuTitle. So I have them to but no translated values. No problem thou to get the translated values for Content or other custom fields. Weired!!&lt;br /&gt;&lt;br /&gt;Instead I hacked the Menu() function in ContentController and changed the Title and MenuTitle values there, and it works. Not a beautiful hack but...!&lt;br /&gt;&lt;br /&gt;Now I only have to hack MetaData to show the right page title.&lt;br /&gt;&lt;br /&gt;Still really confused why I could not retrieve the translated values in the page controller.&lt;br /&gt;&lt;br /&gt;/PO&lt;br&gt;&lt;br&gt;Posted to: Wisa.nl</description>
			<pubDate>Thu, 31 Jul 2008 22:06:07 +1200</pubDate>
			<author>P-O Blomstrand</author>
			<guid>http://www.silverstripe.com/showcase-forum/show/59870?showPost=133021</guid>
		</item>
		
		<item>
			<title>Re: Wisa.nl</title>
			<link>http://www.silverstripe.com/showcase-forum/show/59870?showPost=132961</link>
			<description>I'm using the normal control Menu(1).&lt;br /&gt;&lt;br /&gt;Because I have created a method named Title in my Page Class , the menu items will get translated as needed.&lt;br&gt;&lt;br&gt;Posted to: Wisa.nl</description>
			<pubDate>Thu, 31 Jul 2008 19:13:42 +1200</pubDate>
			<author>Lars Prakken</author>
			<guid>http://www.silverstripe.com/showcase-forum/show/59870?showPost=132961</guid>
		</item>
		
		<item>
			<title>Re: Wisa.nl</title>
			<link>http://www.silverstripe.com/showcase-forum/show/59870?showPost=132804</link>
			<description>Nice job Fuzz10!&lt;br /&gt;&lt;br /&gt;I an trying your ideas on a current project and am a little confused. I wonder if you could describe a little more in detail how the menus are generated. I guess it's not the usual &amp;lt;% control Menu(1) %&amp;gt;. &lt;br /&gt;I can switch the contents in my custom fields but menus does not work since the Menu-function is reading from SiteTree. So inside the control-statement my custom Title and MenuTitle is not available. &lt;br /&gt;&lt;br /&gt;Would be very kind if you could explain a little more.&lt;br /&gt;&lt;br /&gt;/PO&lt;br&gt;&lt;br&gt;Posted to: Wisa.nl</description>
			<pubDate>Thu, 31 Jul 2008 12:45:27 +1200</pubDate>
			<author>P-O Blomstrand</author>
			<guid>http://www.silverstripe.com/showcase-forum/show/59870?showPost=132804</guid>
		</item>
		
		<item>
			<title>Re: Wisa.nl</title>
			<link>http://www.silverstripe.com/showcase-forum/show/59870?showPost=130912</link>
			<description>Dio :&lt;br /&gt;&lt;br /&gt;I wrote up a little howto.  &lt;br /&gt;&lt;br /&gt;Did not know where to put it , so check out the comments on this page :&lt;br /&gt;&lt;br /&gt;http://doc.silverstripe.com/doku.php?id=multilingualcontent&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Integral copy-paste (to make sure it is on the forum as well , with regards to PPL searching).&lt;br /&gt;&lt;br /&gt;-------------------snip-------------------&lt;br /&gt;This comment is In reply to http://www.silverstripe.com/showcase-forum/flat...&lt;br /&gt;&lt;br /&gt;While the multi-language features of Silverstripe are still pretty much Work In Progress I used the following work-around to create a multiple language site which contained custom fields. There is probably a cleaner way , and this only works with simple sites and not too many languages...but hey... it works.&lt;br /&gt;&lt;br /&gt;1&amp;gt; Duplicate the fields you want translated for every language (for example , in my case , for the $Title I created DE_Title and NE_Title)&lt;br /&gt;&lt;br /&gt;2&amp;gt; Add these fields to the Silverstripe backend with AddFieldToTab so users can edit them.&lt;br /&gt;&lt;br /&gt;4&amp;gt; Add language-switching links to your template , in my case , I add a $GET parameter named lang to the URL . e.g. www.mysite.com?lang=EN&lt;br /&gt;&lt;br /&gt;3&amp;gt; In the INIT of your base page class controller (usually Page_Controller) , check for the language $GET param and if it exists , set the current language in the session..&lt;br /&gt;&lt;br /&gt;E.g. :&lt;br /&gt;[code]&lt;br /&gt;if(!empty($_REQUEST['lang'])) {&lt;br /&gt;Session::set('lang', $_REQUEST['lang']);&lt;br /&gt;}&lt;br /&gt;[/code]&lt;br /&gt;&lt;br /&gt;Now you know what the current language should be.&lt;br /&gt;&lt;br /&gt;4&amp;gt; In your base Page Class, create custom getters for the content-fields so they return the right value for the current language Check for the existence of the Lang variable in the session to figure out the current language. My default language is Dutch....&lt;br /&gt;&lt;br /&gt;(e.g.&lt;br /&gt;[code]&lt;br /&gt;function Title() {&lt;br /&gt;if(Session::get('lang') == &quot;EN&quot;){&lt;br /&gt;return $this-&amp;gt;EN_Title;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;} elseif(Session::get('lang') == &quot;DE&quot;) {&lt;br /&gt;return $this-&amp;gt;DE_Title;&lt;br /&gt;&lt;br /&gt;} else {&lt;br /&gt;return $this-&amp;gt;Title;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;[/code]&lt;br /&gt;&lt;br /&gt;5&amp;gt; Create a function to obtain the current language (we use these in templates)&lt;br /&gt;&lt;br /&gt;[code]&lt;br /&gt;function current_language() {&lt;br /&gt;return Session::get('lang');&lt;br /&gt;}&lt;br /&gt;[/code]&lt;br /&gt;&lt;br /&gt;6&amp;gt; To make the URL's somewhat Multi-lingual as well , I add the current language and the translated page title to the URL .... So in my case , the default URL www.mysite.com/over_ons would become www.mysite.com/over_ons/DE/uber_uns for the german version.&lt;br /&gt;&lt;br /&gt;To do this, just combine the needed variables in your templates , e.g..&lt;br /&gt;&lt;br /&gt;[code]href=&quot;$Link{$current_language}/{$URLTitle}&quot; [/code]&lt;br /&gt;&lt;br /&gt;Where $URLTitle is the translated and URL-safe page-title....&lt;br /&gt;&lt;br /&gt;If you do this, make sure to catch the method call SS does when it finds an action parameter in the URL ... (the &quot;DE&quot; in www.mysite.com/over_ons/DE/uber_uns)...&lt;br /&gt;&lt;br /&gt;So in my page_controller class i Created these dummy methods to reroute the request back to the original page:&lt;br /&gt;&lt;br /&gt;[code]&lt;br /&gt;// Dummy methods to catch the language-vars in URL&lt;br /&gt;function DE() {&lt;br /&gt;return $this-&amp;gt;renderWith($this-&amp;gt;getViewer());&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function EN() {&lt;br /&gt;return $this-&amp;gt;renderWith($this-&amp;gt;getViewer());&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function NL() {&lt;br /&gt;return $this-&amp;gt;renderWith($this-&amp;gt;getViewer());&lt;br /&gt;}&lt;br /&gt;[/code]&lt;br /&gt;&lt;br /&gt;I whipped up this text in a hurry, so let me know if I forgot something or screwed something up.... ;)&lt;br /&gt;&lt;br /&gt;-------------------snip-------------------&lt;br&gt;&lt;br&gt;Posted to: Wisa.nl</description>
			<pubDate>Mon, 28 Jul 2008 22:22:20 +1200</pubDate>
			<author>Lars Prakken</author>
			<guid>http://www.silverstripe.com/showcase-forum/show/59870?showPost=130912</guid>
		</item>
		
		<item>
			<title>Re: Wisa.nl</title>
			<link>http://www.silverstripe.com/showcase-forum/show/59870?showPost=124524</link>
			<description>Site looks great!&lt;br /&gt;&lt;br /&gt;Something a little starge with the URLs there though..http://www.wisa.nl/feesttoeters//feesttoeters&lt;br&gt;&lt;br&gt;Posted to: Wisa.nl</description>
			<pubDate>Fri, 18 Jul 2008 20:35:03 +1200</pubDate>
			<author>Scott Buckland</author>
			<guid>http://www.silverstripe.com/showcase-forum/show/59870?showPost=124524</guid>
		</item>
		
		<item>
			<title>Re: Wisa.nl</title>
			<link>http://www.silverstripe.com/showcase-forum/show/59870?showPost=110668</link>
			<description>Yeah , sure !   I'm on vacation ATM but I'll make sure to document it when I get back  (end of July).&lt;br&gt;&lt;br&gt;Posted to: Wisa.nl</description>
			<pubDate>Fri, 04 Jul 2008 07:10:10 +1200</pubDate>
			<author>Lars Prakken</author>
			<guid>http://www.silverstripe.com/showcase-forum/show/59870?showPost=110668</guid>
		</item>
		
		<item>
			<title>Re: Wisa.nl</title>
			<link>http://www.silverstripe.com/showcase-forum/show/59870?showPost=109918</link>
			<description>Your approach to solve the languages seems interesting.&lt;br /&gt;&lt;br /&gt;Did you make an action for every language?&lt;br /&gt;&lt;br /&gt;Looking at the urls you have:&lt;br /&gt;&lt;br /&gt;http://www.wisa.nl/wisa-team/DE/wisa-team&lt;br /&gt;&lt;br /&gt;Would be cool if you documented somewhere in a few steps how this approach was... would be a favor to a lot of us :)&lt;br&gt;&lt;br&gt;Posted to: Wisa.nl</description>
			<pubDate>Thu, 03 Jul 2008 04:37:11 +1200</pubDate>
			<author>Dieter Orens</author>
			<guid>http://www.silverstripe.com/showcase-forum/show/59870?showPost=109918</guid>
		</item>
		
		<item>
			<title>Re: Wisa.nl</title>
			<link>http://www.silverstripe.com/showcase-forum/show/59870?showPost=106930</link>
			<description>As I said ,  no funky functionality... &lt;br /&gt;&lt;br /&gt;Just added some fields to the Page Class to store the translation-texts and I'm using a session variable &amp;amp; the URL to store the current language....&lt;br&gt;&lt;br&gt;Posted to: Wisa.nl</description>
			<pubDate>Fri, 27 Jun 2008 11:30:35 +1200</pubDate>
			<author>Lars Prakken</author>
			<guid>http://www.silverstripe.com/showcase-forum/show/59870?showPost=106930</guid>
		</item>
		

	</channel>
</rss>
