<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[KillerSites.com Web Design Forums - Site in two languages]]></title>
	<link rel="self" href="http://www.killersites.com/forums/feed/atom/topic/346/"/>
	<updated>2009-09-30T09:59:03Z</updated>
	<generator>PunBB</generator>
	<id>http://www.killersites.com/forums/topic/346/site-in-two-languages/</id>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/11093/#p11093"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>martez81 wrote:</cite><blockquote><p>The topic is a bit old but anyway...<br />If you really want to include two languages in only one copy of your pages use strings with content in two languages and switch between them from the url</p><p>For example:</p><p>...website/index.php?lang=english</p><p>$lang = $_POST[&#039;lang&#039;];</p><p>if($lang = &#039;english&#039; ) {<br />echo &quot;This is the fragment of the content in english language&quot;;<br />} else {<br />echo &quot;This is a text in non-english language that will be shown when entering website&quot;;<br />}</p><p>So, if there is no lang var in the link then the website will show its content in non-english language. You have to include &quot;ifs&quot; for every portion of text that will be shown and also for every link that takes you to another subpage.</p><p>Here how it works with one of websites I created:<br /><a href="http://www.damisrestaurant.com" rel="nofollow">www.damisrestaurant.com</a></p><p>Hope it helps.</p></blockquote></div><p>Wow, that is great. Is the code for the change language button something I can find online? I&#039;m trying my hand at web design, as my partner needs a webpage for her Translation business, so this dual language option would be perfect.</p><p>Thanks</p>]]></content>
			<author>
				<name><![CDATA[Helipacter]]></name>
				<uri>http://www.killersites.com/forums/user/8630/</uri>
			</author>
			<updated>2009-09-30T09:59:03Z</updated>
			<id>http://www.killersites.com/forums/post/11093/#p11093</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/8848/#p8848"/>
			<content type="html"><![CDATA[<p>Oops, just found a mistake in my previous post. You have to use super global $_GET instead of $_POST to grab a var from the link <img src="http://www.killersites.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[martez81]]></name>
				<uri>http://www.killersites.com/forums/user/5432/</uri>
			</author>
			<updated>2009-06-26T14:09:39Z</updated>
			<id>http://www.killersites.com/forums/post/8848/#p8848</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/8832/#p8832"/>
			<content type="html"><![CDATA[<p>Thank you!</p><p>your solution is smooth and elegant. I&#039;ll give it a try...</p><br /><p>Cheers, </p><p>Eduardo</p>]]></content>
			<author>
				<name><![CDATA[edoplaza]]></name>
				<uri>http://www.killersites.com/forums/user/176/</uri>
			</author>
			<updated>2009-06-26T04:31:12Z</updated>
			<id>http://www.killersites.com/forums/post/8832/#p8832</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/8682/#p8682"/>
			<content type="html"><![CDATA[<p>The topic is a bit old but anyway...<br />If you really want to include two languages in only one copy of your pages use strings with content in two languages and switch between them from the url</p><p>For example:</p><p>...website/index.php?lang=english</p><p>$lang = $_POST[&#039;lang&#039;];</p><p>if($lang = &#039;english&#039; ) {<br />echo &quot;This is the fragment of the content in english language&quot;;<br />} else {<br />echo &quot;This is a text in non-english language that will be shown when entering website&quot;;<br />}</p><p>So, if there is no lang var in the link then the website will show its content in non-english language. You have to include &quot;ifs&quot; for every portion of text that will be shown and also for every link that takes you to another subpage.</p><p>Here how it works with one of websites I created:<br /><a href="http://www.damisrestaurant.com" rel="nofollow">www.damisrestaurant.com</a></p><p>Hope it helps.</p>]]></content>
			<author>
				<name><![CDATA[martez81]]></name>
				<uri>http://www.killersites.com/forums/user/5432/</uri>
			</author>
			<updated>2009-06-21T21:23:17Z</updated>
			<id>http://www.killersites.com/forums/post/8682/#p8682</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/1859/#p1859"/>
			<content type="html"><![CDATA[<p>Yeah, while Googling, I found a few CMS&#039;s that has that functionality right out of the gate.</p><p>Edit - I hate how it tarneshes my post when I edit it with BIG edited text. I never spell my post correctly the first time.</p>]]></content>
			<author>
				<name><![CDATA[Eric]]></name>
				<uri>http://www.killersites.com/forums/user/7/</uri>
			</author>
			<updated>2009-01-12T17:24:18Z</updated>
			<id>http://www.killersites.com/forums/post/1859/#p1859</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/1856/#p1856"/>
			<content type="html"><![CDATA[<p>A CMS would likely be the best way I think.</p><p>First you would need either the index or a Splash page, here a splash page is OK.</p><p>The Splash page offers Spanish or English(?) and would be the default page for the CMS. Then you could create to categories or two separate &quot;Sites&quot; within the CMS.</p><p>Now the link sends you to the Spanish branch or the English branch. Exactly how to do this depends on the <a href="http://www.killersites.com/forums/topic/96/cms-content-management-system-accessibility-1003008/" rel="nofollow">CMS you choose</a>.</p><p>By hand, you would use a switch case with a logic that says, if the ID of the page is Spanish use this content, if English use that content.</p><p>The CMS version would be easier to maintain and quicker I would think if you are not really experienced with PHP.</p>]]></content>
			<author>
				<name><![CDATA[LSW]]></name>
				<uri>http://www.killersites.com/forums/user/17/</uri>
			</author>
			<updated>2009-01-12T17:00:26Z</updated>
			<id>http://www.killersites.com/forums/post/1856/#p1856</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/1839/#p1839"/>
			<content type="html"><![CDATA[<p>Well, thank you very much for the information. </p><p>The suggested solutions are very interesting, but, as I said before, I need to improve my PHP skills to handle all those scripts properly. For now, I think I&#039;ll duplicate every file in both languages as the site is very small (it would be mainly the navigation bar, and probably a 3 or 4 other pages)</p><br /><p>Cheers, </p><p>Eduardo</p>]]></content>
			<author>
				<name><![CDATA[edoplaza]]></name>
				<uri>http://www.killersites.com/forums/user/176/</uri>
			</author>
			<updated>2009-01-12T12:03:11Z</updated>
			<id>http://www.killersites.com/forums/post/1839/#p1839</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/1837/#p1837"/>
			<content type="html"><![CDATA[<p>I hold 3 language versions on my small website and the only way to manage content is to use php includes sets (so in al one folder with includes per each language):<br />for example:<br /><strong>english-folder:</strong><br />header.php<br />content.php<br />footer.php<br /><strong>otherlang-folder:</strong><br />header.php<br />content.php<br />footer.php<br /> And then php script is used to&nbsp; organize&nbsp; index.php from those includes. If&nbsp; you decide that Spanish version is a home page, use includes from the second folder, and create&nbsp; &nbsp;index-en.php which will appear when your click on this magic button.</p><p>The problem with multilingual website is that once you build it, you (or the website owner)&nbsp; must do its regular (and preferably adequate) updates for each language and this is really become too much work&nbsp; to manage. It is all possible of course but depends on how organized the content is, how often updates are needed and how much time/money are spent on updates.<br />For small website like mine, to support few languages, the script from <a href="http://www.digital-web.com/articles/easypeasy_php_2/" rel="nofollow">this article </a> serves ok but I suppose you can (and may be should consider to) adapt some CMS for both languages if you build bigger website.</p>]]></content>
			<author>
				<name><![CDATA[lm]]></name>
				<uri>http://www.killersites.com/forums/user/13/</uri>
			</author>
			<updated>2009-01-12T10:57:29Z</updated>
			<id>http://www.killersites.com/forums/post/1837/#p1837</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/1824/#p1824"/>
			<content type="html"><![CDATA[<div class="quotebox"><cite>edoplaza wrote:</cite><blockquote><p>As I&#039;m not lazy, I&#039;ll translate both texts myself (or, better than that, I will ask the client to provide the English version of his texts). At least he is not a writer or something like that, with tons of text to translate.</p><p>I was just wondering about the necessity of having every single file in two versions. Maybe, in a future, when I improve my php skills, I&#039;ll have both texts located in a DB and I&#039;ll just use a little function to switch between Spanish and English (Gosh, why didn&#039;t that Esperanto language work..., that would be easier then...)</p><p>Thanks</p><p>Eduardo</p></blockquote></div><p>The easiest way would be to just do what John/Wickham suggested. But, if you only have &quot;one&quot; section on each page that needs to be swaped, then <a href="http://www.visibilityinherit.com/code/swap-panels-example.php#" rel="nofollow">this would be another way to go</a>. Just put your spanish in the other div. Then you don&#039;t have to ever leave the page your on. If you have multiple areas on each page, then style switch would be the other way to go.</p>]]></content>
			<author>
				<name><![CDATA[Eric]]></name>
				<uri>http://www.killersites.com/forums/user/7/</uri>
			</author>
			<updated>2009-01-12T03:07:03Z</updated>
			<id>http://www.killersites.com/forums/post/1824/#p1824</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/1822/#p1822"/>
			<content type="html"><![CDATA[<p>As I&#039;m not lazy, I&#039;ll translate both texts myself (or, better than that, I will ask the client to provide the English version of his texts). At least he is not a writer or something like that, with tons of text to translate.</p><p>I was just wondering about the necessity of having every single file in two versions. Maybe, in a future, when I improve my php skills, I&#039;ll have both texts located in a DB and I&#039;ll just use a little function to switch between Spanish and English (Gosh, why didn&#039;t that Esperanto language work..., that would be easier then...)</p><p>Thanks</p><p>Eduardo</p>]]></content>
			<author>
				<name><![CDATA[edoplaza]]></name>
				<uri>http://www.killersites.com/forums/user/176/</uri>
			</author>
			<updated>2009-01-12T02:36:23Z</updated>
			<id>http://www.killersites.com/forums/post/1822/#p1822</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/1817/#p1817"/>
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>&quot;Have a refreshing moment all the time.&quot; Sounds good to me and I&#039;m working on it.</p></blockquote></div><p><img src="http://www.killersites.com/forums/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></content>
			<author>
				<name><![CDATA[administrator]]></name>
				<uri>http://www.killersites.com/forums/user/2/</uri>
			</author>
			<updated>2009-01-11T21:57:11Z</updated>
			<id>http://www.killersites.com/forums/post/1817/#p1817</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/1816/#p1816"/>
			<content type="html"><![CDATA[<p>And I want to add that under NO CIRCUMSTANCES should you (or your client) use one of those automatic internet translators.&nbsp; If you want something translated, some human will have to do it or you&#039;ll get nothing but crap.&nbsp; </p><p>And in case you need prove - here is the above translated by computer into German and then back into English&quot;</p><div class="quotebox"><blockquote><p>GERMAN:<br />Und ich möchte den unter KEINEN UMSTÄNDEN hinzufügen, wenn Sie (oder Ihr Klient) einen jener automatischen Internet-Übersetzer benutzen.&nbsp; Wenn Sie übersetztes etwas wünschen, muss irgendein Mensch es tun, oder Sie erhalten, nichts aber scheißen.</p></blockquote></div><div class="quotebox"><blockquote><p>Back To English:<br />And I would like to add that under NO CIRCUMSTANCES, if you (or your client) use one of those automatic Internet compilers/translators.&nbsp; If you require translated something, any humans must do it, or, nothing receives you however to shit.</p></blockquote></div><p>Which reminds me - I recently had an email exchange with some guy who contacted me through Killersites who I believe may be from Africa - his New Year wish for me is to:&nbsp; &quot;Have a refreshing moment all the time.&quot; Sounds good to me and I&#039;m working on it <img src="http://www.killersites.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></content>
			<author>
				<name><![CDATA[Andrea]]></name>
				<uri>http://www.killersites.com/forums/user/9/</uri>
			</author>
			<updated>2009-01-11T21:37:08Z</updated>
			<id>http://www.killersites.com/forums/post/1816/#p1816</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/1815/#p1815"/>
			<content type="html"><![CDATA[<p>The &quot;magic&quot; button would be a link to another page. but you could use the first page as a template, use the same structure and stylesheet, just edit the text to a different language, then save under a different filename to be used in the link (and vice versa frorm the new page back to the old page).</p>]]></content>
			<author>
				<name><![CDATA[Wickham]]></name>
				<uri>http://www.killersites.com/forums/user/12/</uri>
			</author>
			<updated>2009-01-11T20:59:36Z</updated>
			<id>http://www.killersites.com/forums/post/1815/#p1815</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/1813/#p1813"/>
			<content type="html"><![CDATA[<p>&quot;magic&quot; - seriously uh - that&#039;s funny. You &quot;could&quot; use a style sheet swichter to do it. But I&#039;m pretty sure I&#039;ve come accross services that do this. Google should be able to light your way.</p>]]></content>
			<author>
				<name><![CDATA[Eric]]></name>
				<uri>http://www.killersites.com/forums/user/7/</uri>
			</author>
			<updated>2009-01-11T20:59:02Z</updated>
			<id>http://www.killersites.com/forums/post/1813/#p1813</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Site in two languages]]></title>
			<link rel="alternate" href="http://www.killersites.com/forums/post/1812/#p1812"/>
			<content type="html"><![CDATA[<p>Hello, </p><p>A client wants his new site to be bilingual, meaning that he wants a &quot;magic&quot; button at the top of the banner saying &quot;English version&quot; (the site is originally in Spanish&quot;) and viceversa which changes the content of the whole site automatically in just one click. What would be the best apporach to achieve this? Do I have to create everything twice, or create like a parallel site?</p><p>Thanks</p><p>Eduardo</p>]]></content>
			<author>
				<name><![CDATA[edoplaza]]></name>
				<uri>http://www.killersites.com/forums/user/176/</uri>
			</author>
			<updated>2009-01-11T20:40:34Z</updated>
			<id>http://www.killersites.com/forums/post/1812/#p1812</id>
		</entry>
</feed>
