Location: PHPKode > projects > Laffer > docs/howto-translate-laffer-userinterface.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> 
<!-- Copyright (c) 2003-2005  Slavei  Karadjov, hide@address.com -->
<html>
<head>
 	<title>Laffer: Free Instant Message Environment</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta NAME="description" CONTENT="Laffer: Complete Open Source Environment For IM Communications">
<meta NAME="keywords"  CONTENT="laffer im instant message messanger icq msn aol jabber yahoo j2me bluetooth html javascript perl php">
<META Name="author" Content="Slavei Karadjov - hide@address.com - http://laffer.sf.net">
<STYLE type="text/css">
         .newst{font-family:verdana, arial, helvetica, geneva; font-size:20px; font-weight:bold; color:#000000}
         .newsb{font-family:verdana, arial, helvetica, geneva; font-size:12px; color:#000000}
         .head1{font-family:verdana, arial, helvetica, geneva; font-size:18px; font-weight:bold; color:#000000}
         .head2{font-family:verdana, arial, helvetica, geneva; font-size:12px; font-weight:bold; color:#000000}
         .head3{font-family:verdana, arial, helvetica, geneva; font-size:18px; font-weight:bold; color:#FFFFFF}
         .disclaimer{font-family:verdana, arial, helvetica, geneva; font-size:10px; color:#000000}
         A{font-family:verdana, arial, helvetica, geneva; text-decoration:none;}
         A:hover{text-decoration:underline}
</STYLE>
<link REL="top"    HREF="/cgi-bin/index.pl" TITLE="Laffer Home Page">
<link REL="parent"    HREF="/cgi-bin/index.pl?page=article&id=docs" TITLE="">
<link REL="next"    HREF="/cgi-bin/index.pl?page=article&id=docs&key=" TITLE=" ">
<link REL="prev"    HREF="/cgi-bin/index.pl?page=article&id=docs&key=373204563" TITLE="Laffer Web Client Mini Manual ">
</head>
 
<BODY bgcolor="white" text="black">
 <!-- BEGIN CONTENT -->
 <table align="center" width="90%" cellspacing="0" cellpadding="4">
 <tr>
 	<td bgcolor="#003399" class="head3">
 		<A href="http://laffer.sourceforge.net" class="head3">Laffer Project</A> <A href="http://laffer.sourceforge.net" class="head3">URL: http://laffer.sourceforge.net</A>
 	</td>
 </tr>
 </table>
 
 <table align="center" width="90%" cellspacing="0" cellpadding="4" border="0">
 <tr>
 	<td bgcolor="#EEEEEE" class="head2">
 		
 	</td>
 </tr>
 <tr>
 	<td class="newst">How To Translate Laffer Interface To Your Favourite Language</td>
 </tr>
 </table>
 
 <table align="center" width="90%" cellspacing="0" cellpadding="0" border="0">
 <tr>
 	<td bgcolor="#999999"><img src="images/clearpixel.gif" width="1" height="1"></td>
 </tr>
 <tr>
 	<td><img src="images/clearpixel.gif" width="1" height="3"></td>
 </tr>
 <tr>
 	<td class="head2">
 		Author: Slavei Karadjov<br>
 		Date: 28-06-2005<br>
 		URL: <a href="http://laffer.sourceforge.net/cgi-bin/index.pl?page=article&id=docs&key=373321466">http://laffer.sourceforge.net/cgi-bin/index.pl?page=article&id=docs&key=373321466</a>
 	</td>
 </tr>
 </table>
 
 
 <!-- SEPARATOR TABLE -->
 <table align="center" width="90%" cellspacing="0" cellpadding="0" border="0">
 <tr>
 	<td><img src="images/clearpixel.gif" width="1" height="8"></td>
 </tr>
 <tr>
 	<td bgcolor="#999999"><img src="images/clearpixel.gif" width="1" height="1"></td>
 </tr>
 <tr>
 	<td bgcolor="#CCCCCC"><img src="images/clearpixel.gif" width="1" height="4"></td>
 </tr>
 <tr>
 	<td bgcolor="#999999"><img src="images/clearpixel.gif" width="1" height="1"></td>
 </tr>
 <tr>
 	<td><img src="images/clearpixel.gif" width="1" height="8"></td>
 </tr>
 </table>
 <!-- SEPARATOR TABLE -->
 
 <table align="center" width="90%" cellspacing="0" cellpadding="0" border="0">
 <tr>
 	<td class="newsb">
 		<h2>Table of Contents</h2>
 <ol>
 <li><a href="#before">Before you start to translate</a></li>
 	<ul>
 		<li><a href="#before-1">What translations are available</a></li>
 		<li><a href="#before-2">First steps you need to take before you start to translate</a></li>
 		<li><a href="#before-3">What do I need to know before I start to translate</a></li>
 	</ul>
 <li><a href="#start">How to translate</a></li>
 	<ul>
 		<li><a href="#start-1">Files needed</a></li>
 		<li><a href="#start-2">How to translate words and sentences</a></li>
 		<li><a href="#start-3">Special symbols and ways to escape them</a></li>
 	</ul>
 <li><a href="#check">How to check the translation</a></li>
 	<ul>
 		<li><a href="#check-1">Show the translation to your friend</a></li>
 		<li><a href="#check-2">Check if the translation is "working"</a></li>
 	</ul>	
 <li><a href="#ready">What to do when you are ready</a></li>
 	<ul>
 		<li><a href="#ready-1">Send the translation back to Laffer developers</a></li>
 	</ul>
 <li><a href="#meta">Meta</a></li>
 </ol>
 
 <h2><a name="before">Before you start to translate</a></h2>
 
 <h3><a name="before-1">What translations are available</a></h3>
 <p>
 For the moment there are three translations of the Laffer interface available. They are in English, Russian and Bulgarian language.
 If you want to translate the interface into your favourite/native language you've got to have good knowledge 
 of one of the languages mentioned above. 
 </p>
 <h3><a name="before-2">First steps you need to take before you start to translate</a></h3>
 <p>
 If you are want to translate the interface in language X, try to find out if somebody has already started such
 translation in language X, or there is official translation. The best way to find the answer is to send request
 to slaff(a)users.sourceforge.net
 </p>
 <h3><a name="before-3">What do I need to know before I start to translate</a></h3>
 <p>
 Except good knowledge of the language you want to add the new translation, and the language from which you want to 
 translate, you must have some spare time and desire to do it.
 Programing  knowledge will help you to cope better with the translation but it's not required.
 </p>
 
 
 <h2><a name="start">How to translate</a></h2>
 
 <h3><a name="start-1">Files needed</a></h3>
 <p>
 Go to modules/lang directory. In it you will find sub-directories with name the two-letter code of the language.
 For example bg/ is for Bulgarian and en/ is for English. Find out what is the two letter code of your language
 - for example kr/ for Korean and create such sub directory. Go to kr/ directory and copy the content of the en/ directory,
 if you know English language, to this directory
 <p>
 Example commands for Unix/Linux OSes:<br>
 $ cd modules/lang
 $ mkdir kr/<br>
 $ cd kr/<br>
 $ cp -R ../en .<br>
 <br>
 All the files in this directory should be translated.
 </p>
 
 <h3><a name="start-2">How to translate words and sentences</a></h3>
 <p>Fist you have to choose the character set in which you will write the messages. For example the Bulgarian
 translation uses windows-1251 character set, which supports Cyrillic and Latin letters. 
 If you are not sure which charset you are using, ask some computer geek near you or google.
 <p>
 Open file "default" located in your language directory with your favourite text editor. 
 There are three things you need to know how to change.
 </p>
 <p>
 <b>Charset</b> - find the line<br>
 $CHARSET = "windows-1251";<br> 
 and change windows-1251 with the charset you will use. <br>
 <br>
 There is a function called "nat2lat" which is responsible for translating letters in the translation
 you are using into latin letters. If you don't know what to do with this function make it look like:<br>
 # [Function to convert from nativate to latin]<br>
 function nat2lat($TMP_DYNAMIC_HTML) {<br>
 	return $TMP_DYNAMIC_HTML;<br>		
 }<br>
 <p><b>Translation of word/sentences/phrases</b>.<br>
 The file "default" is full with lines which look like this<br>
 <br>
 define(STR_START_SEARCH,"Search >>");<br>
 <br>
 To translate this to German, for example, you must change the line to look like:<br>
 <br>
 define(STR_START_SEARCH,"Suchen >>");<br>
 </p>
 <h3><a name="start-3">Special symbols and ways to escape them</a></h3>
 <p>
 You can wrap the translate text with "_TEXT_", or '_TEXT_'. If you use " for wrapping the translated 
 string, every " inside the translated text must be written as \". The same rule apply for '.
 A little programmer's knowledge will help you here. 
 </p>
 
 <h2><a name="check">How to check the translation</a></h2>
 
 <h3><a name="check-1">Show the translation to your friend</a></h3>
 May be the best way to check your translation is to show it to other people, who know the translated language.
 Ask them for their comments and objections.
 
 <h3><a name="check-2">Check if the translation is "working"</a></h3>
 If you think the translation is ready for prime time then open file "config.inc" located in
 modules/ and find this line:<br>
 <br>
 $allowedLanguages = array("bg"=>"Български", "en"=>"English");<br>
 <br>
 Add the two letter code and the name of the language. Look at the example below:<br>
 <br>
 $allowedLanguages = array("de"=>"Deutch", "bg"=>"Български", "en"=>"English");<br>
 <br>
 Also change the line:<br>
 $LANG="en"; # default language<br>
 To:<br>
 $LANG="de"; <br>
 
 <h2><a name="ready">What to do when you are ready</a></h2>
 <h3><a name="ready-1">Send the translation back to Laffer developers</a></h3>
 Send archive of the directory with the translated files to slaff(a)users.sourceforge.net or try to
 announce your translation in the forums of the project: <a href="http://laffer.sf.net">http://laffer.sf.net</a>
 The only sure way to have your translation in the official distribution of Laffer is to send it to the 
 developers.
 
 <h2><a name="meta">Meta</a></h2>
 This manual is written by Slavej Karadjov for Laffer Web Client(LWC) version  0.3.2.6 or bigger.<br>
 LWC is part of the <a href="http://laffer.sf.net">Laffer Project</a>.<br>
 LWC is free software under GPL license.<br>
 		<p align='center'><font face="verdana, arial, helvetica, geneva" size="-1"><a href="http://laffer.sf.net/cgi-bin/index.pl?page=article&id=docs&key="> &lt;&lt; </a> | <a href="laffer-web-client-manual.html">Laffer Web Client Mini Manual &gt;&gt;</a></font><br>
 	</td>
 </tr>
 </table>
 
 <!-- SEPARATOR TABLE -->
 <table align="center" width="90%" cellspacing="0" cellpadding="0" border="0">
 <tr>
 	<td><img src="images/clearpixel.gif" width="1" height="8"></td>
 </tr>
 <tr>
 	<td bgcolor="#999999"><img src="images/clearpixel.gif" width="1" height="1"></td>
 </tr>
 <tr>
 	<td bgcolor="#CCCCCC"><img src="images/clearpixel.gif" width="1" height="4"></td>
 </tr>
 <tr>
 	<td bgcolor="#999999"><img src="images/clearpixel.gif" width="1" height="1"></td>
 </tr>
 <tr>
 	<td><img src="images/clearpixel.gif" width="1" height="8"></td>
 </tr>
 </table>
 <!-- SEPARATOR TABLE -->
 
 <table align="center" width="90%" cellspacing="0" cellpadding="0" border="0">
 <tr>
 	<td  class="disclaimer">
 	<P align="center" class="disclaimer">
 		<em>All materials in this site are published under <a rel="license" href="http://creativecommons.org/licenses/by-nc/2.0/" target="_blank">Creative Commons License</a> unless otherwise noted.
 		<a rel="license" href="http://creativecommons.org/licenses/by-nc/2.0/" target="_blank"><img alt="Creative Commons License" src="images/somerights20.png" valign="top" align="right" border="0"></a>
 		<br>All trademarks, logos and copyrights mentioned on this site are the property of their respective owners.
 		<br>
 		Copyright &copy; 2004-2005 Slavei Karadjov.
 		<br>
 		All rights reserved. 
 	</P>
 	</td>
 </tr>
</table>
</BODY>
</HTML>
Return current item: Laffer