<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">2. The website does not support translations yet. I don&#39;t think it is much work to support it. Mainly the HTML class template() function needs to check the browser for the language, then change the template dir, if the template for the language is not found, then the EN version is loaded as a fallback.</blockquote>
<div><br>I have PHP programming for 4 years and my level still is not perfect, although the management sufficiently. <br> <br>
I think it&#39;s hard work, but it is not difficult. Some of my pages bear
languages and this is a small sketch of the script that I use to
recognize the languages and apply them in my pages&nbsp;</div><div><br>&lt;?<br>$lg=&#39;&#39;;<br>if(isset($_GET[&#39;lg&#39;])) # First check de language variable<br>{<br>&nbsp;&nbsp;&nbsp; switch($_GET[&#39;lg&#39;])<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case en: $lg=&#39;en&#39;;break;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case es: $lg=&#39;es&#39;;break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case fr: $lg=&#39;fr&#39;;break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case de: $lg=&#39;de&#39;;break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # More languages support here<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; default: $lg=&#39;en&#39;;break; #Default language if language not support<br>
&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; setcookie(&#39;lg&#39;,$lg,time()+7*24*60*60,&#39;&#39;,&#39;&#39;); #Set cookie language for one week<br>}<br>elseif(isset($_COOKIE[&#39;lg&#39;])) #Second the cookie language<br>{<br>&nbsp;&nbsp;&nbsp; switch($_COOKIE[&#39;lg&#39;])<br>
&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case EN: $lg=&#39;en&#39;;break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case ES: $lg=&#39;es&#39;;break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case FR: $lg=&#39;fr&#39;;break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case GR: $lg=&#39;gr&#39;;break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # More languages support here<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; default: $lg=&#39;en&#39;;break; #Default language if language not support<br>&nbsp;&nbsp;&nbsp; }<br>}<br>elseif(!empty($_SERVER[&#39;HTTP_ACCEPT_LANGUAGE&#39;])) # Third the browser language<br>{<br>&nbsp;&nbsp;&nbsp; #es-es,es;q=0.8,en-us;q=0.5,en;q=0.3&nbsp;&nbsp;&nbsp; Example of my string browser language<br>
&nbsp;&nbsp;&nbsp; $lgs=explode(&#39;;&#39;,$_SERVER[&#39;HTTP_ACCEPT_LANGUAGE&#39;]);<br>&nbsp;&nbsp;&nbsp; $lgs=explode(&#39;-&#39;,$lgs[0]);<br>&nbsp;&nbsp;&nbsp; switch($lgs[0])<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case &#39;es&#39;: $lg=&#39;es&#39;;break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case &#39;en&#39;: $lg=&#39;en&#39;;break;<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case &#39;fr&#39;: $lg=&#39;fr&#39;;break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; case &#39;de&#39;: $lg=&#39;gr&#39;;break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; # More languages support here<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; default: $lg=&#39;en&#39;;break; #Default language if language not support<br>
&nbsp;&nbsp;&nbsp; }<br>}<br>else $lg=&#39;en&#39;; # Finally default language<br><br>/* Running this script at the beggining, we got the user language, then<br>for each template, we load a folder with the template file, if not exits<br>
we load the default template file*/<br><br># Examples<br>require_once(&#39;templates/&#39;.$lg.&#39;/yourcoolfile.php&#39;);<br><br># Load a wwn with support language<br>if(!exist(&#39;wwn/&#39;.$lg.&#39;/wn20080428_346.xml&#39;)) $file=&#39;wwn/en/wn20080428_346.xml&#39;;<br>
<br><br>/*<br>All codes for support language<br>Code&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Pays / langue<br>&nbsp;af&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Africain <br>&nbsp;sq&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Albanais <br>&nbsp;ar-dz&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Alg�rien <br>&nbsp;de&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Allemand <br>&nbsp;de-at&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Allemand (Austrian) <br>&nbsp;de-li&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Allemand (Liechtenstein) <br>
&nbsp;de-lu&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Allemand (Luxembourg) <br>&nbsp;de-ch&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Allemand (Suisse) <br>&nbsp;en-us&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Am�ricain <br>&nbsp;en&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Anglais <br>&nbsp;en-za&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Anglais (Afrique du sud) <br>&nbsp;en-bz&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Anglais (B�lize) <br>&nbsp;en-gb&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Anglais (Grande Bretagne) <br>
&nbsp;ar&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Arabe <br>&nbsp;ar-sa&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Arabe (Arabie Saoudite)&nbsp; <br>&nbsp;ar-bh&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Arabe (Bahre�n) <br>&nbsp;ar-ae&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Arabe (Emirat arabe uni)&nbsp; <br>&nbsp;en-au&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Australien <br>&nbsp;eu&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Basque <br>&nbsp;nl-be&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Belge <br>&nbsp;be&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Bi�lorussie <br>
&nbsp;bg&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Bulgarre&nbsp; <br>&nbsp;en-ca&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Canadien <br>&nbsp;ca&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Catalan <br>&nbsp;zh&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Chinois <br>&nbsp;zh-hk&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Chinois (Hong-Kong)&nbsp; <br>&nbsp;zh-cn&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Chinois (PRC) <br>&nbsp;zh-sg&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Chinois (Singapourg) <br>&nbsp;zh-tw&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Chinois (Ta�wan)&nbsp; <br>
&nbsp;ko&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Cor�ein <br>&nbsp;cs&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Cr�te&nbsp; <br>&nbsp;hr&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Croate&nbsp; <br>&nbsp;da&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Danois <br>&nbsp;ar-eg&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Egyptien <br>&nbsp;es&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol <br>&nbsp;es-ar&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Argentine)&nbsp; <br>&nbsp;es-bo&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Bolivie) <br>&nbsp;es-cl&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Chilie) <br>
&nbsp;es-co&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Colombie)&nbsp; <br>&nbsp;es-cr&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Costa Rica)&nbsp; <br>&nbsp;es-sv&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (El Salvador) <br>&nbsp;es-ec&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Equateur)&nbsp; <br>&nbsp;es-gt&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Guatemala) <br>&nbsp;es-hn&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Honduras) <br>
&nbsp;es-mx&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Mexique) <br>&nbsp;es-ni&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Nicaragua) <br>&nbsp;es-pa&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Panama) <br>&nbsp;es-py&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Paraguay)&nbsp; <br>&nbsp;es-pe&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (P�rou)&nbsp; <br>&nbsp;es-pr&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Puerto Rico)&nbsp; <br>
&nbsp;en-tt&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Trinidad)&nbsp; <br>&nbsp;es-uy&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Uruguay) <br>&nbsp;es-ve&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Espagnol (Venezuela) <br>&nbsp;et&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Estonien&nbsp; <br>&nbsp;sx&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Estonien <br>&nbsp;fo&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Faeroese&nbsp; <br>&nbsp;fi&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Finlandais&nbsp; <br>&nbsp;fr&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Fran�ais&nbsp; <br>
&nbsp;fr-fr&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Fran�ais&nbsp; <br>&nbsp;fr-be&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Fran�ais (Belgique)&nbsp; <br>&nbsp;fr-ca&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Fran�ais (Canada)&nbsp; <br>&nbsp;fr-lu&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Fran�ais (Luxembourg) <br>&nbsp;fr-ch&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Fran�ais (Suisse) <br>&nbsp;gd&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Galicien <br>&nbsp;el&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Gr�c&nbsp; <br>&nbsp;he&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;H�breux <br>
&nbsp;nl&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Hollandais <br>&nbsp;hu&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Hongrois&nbsp; <br>&nbsp;in&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Indon�sien <br>&nbsp;hi&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Indou&nbsp; <br>&nbsp;fa&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Iranien <br>&nbsp;ar-iq&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Iraquien&nbsp; <br>&nbsp;en-ie&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Irlandais <br>&nbsp;is&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Islandais&nbsp; <br>&nbsp;it&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Italien&nbsp; <br>&nbsp;it-ch&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Italien (Suisse)&nbsp; <br>
&nbsp;en-jm&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Jamaicain&nbsp; <br>&nbsp;ja&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Japonais&nbsp; <br>&nbsp;ar-jo&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Jordanien&nbsp; <br>&nbsp;ar-kw&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Koweitien&nbsp; <br>&nbsp;lv&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Lettische&nbsp; <br>&nbsp;ar-lb&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Libanais&nbsp; <br>&nbsp;lt&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Littuanien&nbsp; <br>&nbsp;ar-ly&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Lybien&nbsp; <br>&nbsp;mk&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Mac�doine&nbsp; <br>
&nbsp;ms&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Mal�sien&nbsp; <br>&nbsp;mt&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Maltais <br>&nbsp;ar-ma&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Marocain&nbsp; <br>&nbsp;en-nz&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;N�o-z�landais <br>&nbsp;no&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Norv�gien (bokmal)&nbsp; <br>&nbsp;no&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Norv�gien (Nynorsk)&nbsp; <br>&nbsp;ar-om&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Oman&nbsp; <br>&nbsp;pl&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Polonais <br>&nbsp;pt&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Portugais&nbsp; <br>
&nbsp;pt-br&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Portugais (Br�sil)&nbsp; <br>&nbsp;ar-qa&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Quatar&nbsp; <br>&nbsp;rm&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Rhaeto-Romanic <br>&nbsp;ro&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Roumain (Moldavie) <br>&nbsp;ro-mo&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Roumain (Moldavie)&nbsp; <br>&nbsp;ru&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Russe <br>&nbsp;ru-mo&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Russe (Moldavie) <br>&nbsp;sr&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Serbe (Cyrillic)&nbsp; <br>
&nbsp;sr&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Serbe (Latin) <br>&nbsp;sk&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Slovaque&nbsp; <br>&nbsp;sl&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Slov�ne&nbsp; <br>&nbsp;sb&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Sorbian <br>&nbsp;sv&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Su�dois <br>&nbsp;sv-fi&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Su�dois (Finlande) <br>&nbsp;ar-sy&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Syrien <br>&nbsp;th&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Tha�landais <br>&nbsp;ts&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Tsonga (Afrique du sud)&nbsp; <br>
&nbsp;tn&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Tswana (Afrique du sud) <br>&nbsp;ar-tn&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Tunisien&nbsp; <br>&nbsp;tr&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Turc <br>&nbsp;uk&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Ukrainien <br>&nbsp;ur&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Urdu&nbsp; <br>&nbsp;vi&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Vietnamien <br>&nbsp;xh&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Xhosa (Afrique)&nbsp; <br>&nbsp;ar-ye&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Y�men <br>&nbsp;ji&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Yiddish <br>
&nbsp;zu&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;Zulu (Afrique) <br>*/<br>?&gt; <br></div><div>&nbsp;<br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
3. Some parts, like the news and WWN are not in a system that can be easily translated. Not sure what to do about that. IOW, they are not using the html template() class, they are based on a hacky XML format.</blockquote>
<div><br>XML not is a problem.&nbsp; <div id="result_box" dir="ltr">The
contents of WWN can be easily translated. Only you must create a
directory for each language and put all the files in English so that
they can be loaded. After that there is only translate the contents of
XML (not the label, if not the content) and the WWN will be translated.
<br> <br> I think the translation of the website is very important
because with the growth of Wine and many new users will greatly
appreciate that the contents may be in their language.<br><br>I could try to build support for website, but I have not even looked at
the entire code of the website and I take a few weeks (or maybe just
days) understand. It would be very helpful if the website was
translated for Wine 1.0.<br></div> </div></div><a href="http://www.apogeus.es" target="_blank"></a>