phpGroupWare is built using a multi-language support scheme. This means the pages can be translated to other languages very easily. It is done thru a series of lang files, which can be translated and selected by the user.
Some instructions on using the lang files.
Under inc/lang there needs to be a sub-directory for each langague. Inside the
directory there are a number of files for each application. There is one common file
which contains a list of words that all applications use. ie, add, delete, edit, etc...
Words that are specific to a application should be stored with that applications include file.
function lang_todo($message, $m1 = "", $m2 = "", $m3 = "", $m4 = "") { $message = strtolower($message); switch($message) { case "urgency": $s = "Urgency"; break; case "completed": $s = "completed"; break; [ snip ] default: $s = "<b>*</b> " . $message; } return $s; }
$m1, $m2,
$m3, and $m4
are used to pass extra data to be place in the middle of a sentence.You have 29 new messages!The default should return a bold faced * and the word that wasn't found. This allows users to notice that something is missing in the files and make changes if necessary.