<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Chevereto Forums - Add more than one language?]]></title>
		<link>http://chevereto.com/forums/topic436-add-more-than-one-language.html</link>
		<description><![CDATA[The most recent posts in Add more than one language?.]]></description>
		<lastBuildDate>Mon, 25 Jan 2010 15:38:37 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Add more than one language?]]></title>
			<link>http://chevereto.com/forums/post2159.html#p2159</link>
			<description><![CDATA[<p>Yes it works.<br />thank you very much !! <img src="http://chevereto.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[null@example.com (booyaka95)]]></author>
			<pubDate>Mon, 25 Jan 2010 15:38:37 +0000</pubDate>
			<guid>http://chevereto.com/forums/post2159.html#p2159</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add more than one language?]]></title>
			<link>http://chevereto.com/forums/post2156.html#p2156</link>
			<description><![CDATA[<div class="quotebox"><cite>booyaka95 wrote:</cite><blockquote><p>Does it work with Chevereto 1.6 ?</p></blockquote></div><p>I haven&#039;t tested it but looking at the 1.6rev2 zip it should. As long as it has multiple language support it should work.</p>]]></description>
			<author><![CDATA[null@example.com (gamerlv)]]></author>
			<pubDate>Sun, 24 Jan 2010 12:42:16 +0000</pubDate>
			<guid>http://chevereto.com/forums/post2156.html#p2156</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add more than one language?]]></title>
			<link>http://chevereto.com/forums/post2154.html#p2154</link>
			<description><![CDATA[<p>Does it work with Chevereto 1.6 ?</p>]]></description>
			<author><![CDATA[null@example.com (booyaka95)]]></author>
			<pubDate>Sun, 24 Jan 2010 10:10:47 +0000</pubDate>
			<guid>http://chevereto.com/forums/post2154.html#p2154</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add more than one language?]]></title>
			<link>http://chevereto.com/forums/post2153.html#p2153</link>
			<description><![CDATA[<p>Thank you ;D</p>]]></description>
			<author><![CDATA[null@example.com (booyaka95)]]></author>
			<pubDate>Sun, 24 Jan 2010 10:03:03 +0000</pubDate>
			<guid>http://chevereto.com/forums/post2153.html#p2153</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add more than one language?]]></title>
			<link>http://chevereto.com/forums/post2149.html#p2149</link>
			<description><![CDATA[<div class="quotebox"><cite>booyaka95 wrote:</cite><blockquote><p>Please tell me how to do this <img src="http://chevereto.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p></blockquote></div><p>Ok well, it&#039;s nothing fancy but here&#039;s it:<br />Find in engine.php :<br /></p><div class="codebox"><pre><code>// LANGUAGE

include(&#039;lang/&#039;.LANG.&#039;.php&#039;);

if (LANG!==&#039;es&#039;) { $lang = LANG; }</code></pre></div><p>Replace it with this:<br /></p><div class="codebox"><pre><code>// LANGUAGE
//if (LANG !==&#039;es&#039;) { $lang = LANG; }

if (isset($_GET[&#039;lang&#039;])) {
    $lang = $_GET[&#039;lang&#039;];
    $_SESSION[&#039;chev_lang&#039;] = $_GET[&#039;lang&#039;]; //storing current language in session 
    } elseif (isset($_SESSION[&#039;chev_lang&#039;])) {
    $lang = $_SESSION[&#039;chev_lang&#039;]; //getting the language from the session    
    } else {
    $lang = LANG;
    }
include(&#039;lang/&#039;.$lang.&#039;.php&#039;);</code></pre></div><p>Find in index.php <br /></p><div class="codebox"><pre><code>&lt;!-- selector --&gt;</code></pre></div><p>Replace it with:<br /></p><div class="codebox"><pre><code> 
&lt;!--language selector--&gt;
&lt;div id=&quot;languages&quot; class=&quot;lang_selector&quot;&gt;
    &lt;!--dutch/ used this a template--&gt;
    &lt;a href=&quot;&lt;?=$_SERVER[&#039;PHP_SELF&#039;]?&gt;?lang=nl&quot; title=&quot;Dutch&quot;&gt;&lt;img src=&quot;&lt;?=PATH_SCRIPT;?&gt;site-img/lang/nl.png&quot; alt=&quot;dutch&quot;&gt;&lt;/a&gt;
    
    &lt;a href=&quot;&lt;?=$_SERVER[&#039;PHP_SELF&#039;]?&gt;?lang=fr&quot; title=&quot;French&quot;&gt;&lt;img src=&quot;&lt;?=PATH_SCRIPT;?&gt;site-img/lang/fr.png&quot; alt=&quot;French&quot;&gt;&lt;/a&gt;
    &lt;a href=&quot;&lt;?=$_SERVER[&#039;PHP_SELF&#039;]?&gt;?lang=es&quot; title=&quot;Spanis&quot;&gt;&lt;img src=&quot;&lt;?=PATH_SCRIPT;?&gt;site-img/lang/es.png&quot; alt=&quot;Spanis&quot;&gt;&lt;/a&gt;
    &lt;a href=&quot;&lt;?=$_SERVER[&#039;PHP_SELF&#039;]?&gt;?lang=en&quot; title=&quot;English&quot;&gt;&lt;img src=&quot;&lt;?=PATH_SCRIPT;?&gt;site-img/lang/gb.png&quot; alt=&quot;English&quot;&gt;&lt;/a&gt;
    &lt;a href=&quot;&lt;?=$_SERVER[&#039;PHP_SELF&#039;]?&gt;?lang=cn&quot; title=&quot;Chinees&quot;&gt;&lt;img src=&quot;&lt;?=PATH_SCRIPT;?&gt;site-img/lang/cn.png&quot; alt=&quot;Chinees&quot;&gt;&lt;/a&gt;    
    &lt;/div&gt;
&lt;!-- selector --&gt;</code></pre></div><p>Now all these languages are hard coded. If want to add more just adding another line copied from one of the examples.</p><p>Now add to the end of estilo.css<br /></p><div class="codebox"><pre><code>/* Langauge selectors */
div#languages {
position:relative;
float:right;
border:0px;
text-decoration:none;
}
#languages img {
border:0px;
}</code></pre></div><p>Finally download and extract this zip<br />into site-image/lang</p><p><a href="http://www.famfamfam.com/lab/icons/flags/">http://www.famfamfam.com/lab/icons/flags/</a></p><p>This should give you the same result as the image I showed earlier. If not don&#039;t hesitate to ask.<br /><strong>[Edit]</strong><br />Sorry if anyone already followed this but if forgot to tell that you need to put <br /></p><div class="codebox"><pre><code>session_start();</code></pre></div><p>right after the &lt;? in index.php<br />This is so that it remembers which language the user selected.</p>]]></description>
			<author><![CDATA[null@example.com (gamerlv)]]></author>
			<pubDate>Sat, 23 Jan 2010 15:07:37 +0000</pubDate>
			<guid>http://chevereto.com/forums/post2149.html#p2149</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add more than one language?]]></title>
			<link>http://chevereto.com/forums/post2148.html#p2148</link>
			<description><![CDATA[<p>Please tell me how to do this <img src="http://chevereto.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[null@example.com (booyaka95)]]></author>
			<pubDate>Sat, 23 Jan 2010 12:09:48 +0000</pubDate>
			<guid>http://chevereto.com/forums/post2148.html#p2148</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add more than one language?]]></title>
			<link>http://chevereto.com/forums/post2143.html#p2143</link>
			<description><![CDATA[<p>yes this is what im looking for <img src="http://chevereto.com/forums/img/smilies/big_smile.png" width="15" height="15" alt="big_smile" /></p>]]></description>
			<author><![CDATA[null@example.com (booyaka95)]]></author>
			<pubDate>Fri, 22 Jan 2010 13:26:14 +0000</pubDate>
			<guid>http://chevereto.com/forums/post2143.html#p2143</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add more than one language?]]></title>
			<link>http://chevereto.com/forums/post2133.html#p2133</link>
			<description><![CDATA[<p>Is this the effect you where aiming for?<br /><a href="http://img710.imageshack.us/i/previewlang.png/"><span class="postimg"><img src="http://img710.imageshack.us/img710/4839/previewlang.png" alt="http://img710.imageshack.us/img710/4839/previewlang.png" /></span></a><br />This is based of chevereto 1.7 which has multi language support by default, I just made it switchable.</p>]]></description>
			<author><![CDATA[null@example.com (gamerlv)]]></author>
			<pubDate>Tue, 19 Jan 2010 14:39:19 +0000</pubDate>
			<guid>http://chevereto.com/forums/post2133.html#p2133</guid>
		</item>
		<item>
			<title><![CDATA[Re: Add more than one language?]]></title>
			<link>http://chevereto.com/forums/post2132.html#p2132</link>
			<description><![CDATA[<p>looking for the same thing.. pm me if you have a solution please.</p>]]></description>
			<author><![CDATA[null@example.com (scruby)]]></author>
			<pubDate>Tue, 19 Jan 2010 14:37:19 +0000</pubDate>
			<guid>http://chevereto.com/forums/post2132.html#p2132</guid>
		</item>
		<item>
			<title><![CDATA[Add more than one language?]]></title>
			<link>http://chevereto.com/forums/post2131.html#p2131</link>
			<description><![CDATA[<p>Can someone help me i would at more languages on my image hoster..<br />in the right corner a flag for german etc..</p>]]></description>
			<author><![CDATA[null@example.com (booyaka95)]]></author>
			<pubDate>Mon, 18 Jan 2010 19:44:59 +0000</pubDate>
			<guid>http://chevereto.com/forums/post2131.html#p2131</guid>
		</item>
	</channel>
</rss>

