Location: PHPKode > projects > Bradabra > bradabra/include/lang.php
<?php
//****************************************************************************
//
// Copyright (C) 2001 Eric SEIGNE <hide@address.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
//****************************************************************************
//
// For more informations, get to the project's main source file.
//
//****************************************************************************

if(!defined("__lang_php__")):
define("__lang_php__", "1");


//----------------------------------------------------------------------------
// Supported languages
//----------------------------------------------------------------------------
$g_Languages = array (
  "default" => "French",

  "en"      => "English",
  "en-us"   => "English",
  "en-gb"   => "English",
  "fr"      => "French",
  "fr-ch"   => "French",   // French/Swiss
  "fr-ca"   => "French"    // French/Canada
);


//----------------------------------------------------------------------------
// Translations
//----------------------------------------------------------------------------
$g_Translations = array(
  "English" => array(
    // Words, Expressions
    "Add"                            => "Add",
    "Address"                        => "Address",
    "Administrator"                  => "Administrator",
    "Alert threshold"                => "Alert threshold",
    "Alert thresholds mailing list"  => "Alert thresholds mailing list",
    "All (masculine-plural)"         => "All",
    "All (feminine-plural)"          => "All",
    "archive"                        => "archive",
    "archives"                       => "archives",
    "Archives"                       => "Archives",
    "Authorized internal modules"    => "Authorized internal modules",
    "Automatic change"               => "Automatic change",
    "Calculate"                      => "Calculate",
    "Cancel"                         => "Cancel",
    "Capital"                        => "Capital", // enterprise capital
    "Case sensitive"                 => "Case sensitive",
    "Categories"                     => "Categories",
    "Category"                       => "Category",
    "Category modification"          => "Category modification",
    "Categories"                     => "Categories",
    "City"                           => "City",
    "Class"                          => "Class",
    "Clear"                          => "Clear",
    "Client"                         => "Client",
    "Comments"                       => "Comments",
    "configuration"                  => "configuration",
    "Config"                         => "Config",
    "Configuration"                  => "Configuration",
    "Contact"                        => "Contact",
    "Contact modification"           => "Contact modification",
    "Contacts"                       => "Contacts",
    "Content"                        => "Content",
    "Converter"                      => "Converter",
    "Country"                        => "Country",
    "Currency"                       => "Currency",
    "Currencies"                     => "Currencies",
    "Date"                           => "Date",
    "Date format"                    => "Date format",
    "Day"                            => "Day",
    "Delete"                         => "Delete",
    "Description"                    => "Description",
    "Designation"                    => "Designation",
    "Document"                       => "Document",
    "EMail"                          => "E-Mail",
    "EMails"                         => "E-Mails",
    "Enterprise"                     => "Enterprise",
    "Entire content"                 => "Entire content",
    "Exact match"                    => "Exact match",
    "Extented (feminine)"            => "Extented",
    "External modules"               => "External modules",
    "fax"                            => "fax",
    "Fax"                            => "Fax",
    "Firstname"                      => "Firstname",
    "Fullname"                       => "Fullname",
    "Help"                           => "Help",
    "Home"                           => "Home",
    "ID"                             => "ID",
    "In price"                       => "In price",
    "Inclusive Of Tax"               => "Inclusive Of Tax", // must be an abbreviation
    "invoice"                        => "invoice",
    "Invoice"                        => "Invoice",
    "Invoices"                       => "Invoices",
    "Item"                           => "Item",
    "Item modification"              => "Item modification",
    "Items"                          => "Items",
    "Lastname"                       => "Lastname",
    "Legal status"                   => "Legal status",
    "Logged as"                      => "Logged as",
    "Login"                          => "Login",
    "Logo"                           => "Logo",
    "Logo path"                      => "Logo path",
    "Logout"                         => "Logout",
    "Mobile"                         => "Mob", // "phone", abbreviation
    "Month"                          => "Month",
    "Name"                           => "Name",
    "New category"                   => "New category",
    "New contact"                    => "New contact",
    "New invoice"                    => "New invoice",
    "New item"                       => "New item",
    "New quotation"                  => "New quotation",
    "New user"                       => "New user",
    "No entry"                       => "No entry",
    "Normal (feminine)"              => "Normal",
    "Number of references"           => "Number of references",
    "Occurrences"                    => "Occurrences",
    "on (date)"                      => "on",
    "Order by"                       => "Order by",
    "Out price"                      => "Out price",
    "Owner"                          => "Owner",
    "Password"                       => "Password",
    "phone"                          => "phone",  // abbreviation
    "Phone"                          => "Phone",
    "Postal code"                    => "Postal code",
    "Private"                        => "Private",
    "Protected"                      => "Protected",
    "Public"                         => "Public",
    "Qty"                            => "Qty", // abbreviation
    "Quantity"                       => "Quantity",
    "quotation"                      => "quotation",
    "Quotation"                      => "Quotation",
    "Quotations"                     => "Quotations",
    "Ref"                            => "Ref", // abbreviation
    "Reference"                      => "Reference",
    "Result"                         => "Result",
    "Results"                        => "Results",
    "Search"                         => "Search",
    "Search engine"                  => "Search engine",
    "Search in"                      => "Search in",
    "seconds"                        => "seconds",
    "Sessions log"                   => "Sessions log",
    "Size"                           => "Size",
    "Start stamp"                    => "Start stamp",
    "Stock's alert thresholds"       => "Stock's alert thresholds",
    "Tax"                            => "Tax",
    "Tax Free"                       => "Tax Free", // must be an abbreviation
    "Title"                          => "Title",
    "Today"                          => "Today",
    "Total"                          => "Total",
    "Trade register"                 => "Trade register",
    "Type"                           => "Type",
    "U"                              => "U", // "unit", abbreviation
    "Unit price"                     => "Unit price",
    "User"                           => "User",
    "User modification"              => "User modification",
    "User options"                   => "User options",
    "Users managing"                 => "Users managing",
    "Validate"                       => "Validate",
    "Value"                          => "Value",
    "VAT"                            => "VAT", // Value Added Tax
    "View type"                      => "View type",
    "Website"                        => "Website",
    "Year"                           => "Year",

    // Days
    "Monday"    => "Monday",
    "Tuesday"   => "Tuesday",
    "Wednesday" => "Wednesday",
    "Thursday"  => "Thursday",
    "Friday"    => "Friday",
    "Saturday"  => "Saturday",
    "Sunday"    => "Sunday",

    // Days abbreviated
    "Mon" => "Mon",
    "Tue" => "Tue",
    "Wed" => "Wed",
    "Thu" => "Thu",
    "Fri" => "Fri",
    "Sat" => "Sat",
    "Sun" => "Sun",

    // Monthes
    "January"   => "January",
    "February"  => "February",
    "March"     => "March",
    "April"     => "April",
    "May"       => "May",
    "June"      => "June",
    "July"      => "July",
    "August"    => "August",
    "September" => "September",
    "October"   => "October",
    "November"  => "November",
    "December"  => "December",

    // Monthes abbreviated
    "Jan" => "Jan",
    "Feb" => "Feb",
    "Mar" => "Mar",
    "Apr" => "Apr",
    "May" => "May",
    "Jun" => "Jun",
    "Jul" => "Jul",
    "Aug" => "Aug",
    "Sep" => "Sep",
    "Oct" => "Oct",
    "Nov" => "Nov",
    "Dec" => "Dec",

    // File size units
    "byte"  => "byte",
    "bytes" => "bytes",
    "Kb"    => "Kb",
    "Mb"    => "Mb",
    "Gb"    => "Gb",
    "Tb"    => "Tb",

    // Full sentences
    "File is not readable, please choose another file" => "File is not readable, please choose another file",
    "File has been deleted, please re-choose a file"   => "File has been deleted, please re-choose a file",
    "No internal modules"                              => "No internal modules",
    "Operation successfully executed"                  => "Operation successfully executed",
    "Please choose a file"                             => "Please choose a file",
    "Remember login informations next time"            => "Remember login informations next time",
    "You are not authorized to modify this entry"      => "You are not authorized to modify this entry",

    // ???
    "APE" => "APE"
  ),


  "French" => array(
    // Words, Expressions
    "Add"                            => "Ajouter",
    "Address"                        => "Adresse",
    "Administrator"                  => "Administrateur",
    "Alert threshold"                => "Seuil d'alerte",
    "Alert thresholds mailing list"  => "Mailing list des seuils d'alerte",
    "All (masculine-plural)"         => "Tous",
    "All (feminine-plural)"          => "Toutes",
    "archive"                        => "archive",
    "archives"                       => "archives",
    "Archives"                       => "Archives",
    "Authorized internal modules"    => "Modules internes autorisés",
    "Automatic change"               => "Conversion automatique",
    "Calculate"                      => "Calculer",
    "Cancel"                         => "Annuler",
    "Capital"                        => "Capital", // enterprise capital
    "Case sensitive"                 => "Sensible à la casse",
    "Categories"                     => "Catégories",
    "Category"                       => "Catégorie",
    "Category modification"          => "Modification d'une catégorie",
    "Categories"                     => "Catégories",
    "City"                           => "Ville",
    "Class"                          => "Classe",
    "Clear"                          => "Vider",
    "Client"                         => "Client",
    "Comments"                       => "Commentaires",
    "configuration"                  => "configuration",
    "Config"                         => "Config",
    "Configuration"                  => "Configuration",
    "Contact"                        => "Contact",
    "Contact modification"           => "Modification d'un contact",
    "Contacts"                       => "Contacts",
    "Content"                        => "Contenu",
    "Converter"                      => "Convertisseur",
    "Country"                        => "Pays",
    "Currency"                       => "Devise",
    "Currencies"                     => "Devises",
    "Date"                           => "Date",
    "Date format"                    => "Format de date",
    "Day"                            => "Jour",
    "Delete"                         => "Supprimer",
    "Description"                    => "Description",
    "Designation"                    => "Désignation",
    "Document"                       => "Document",
    "EMail"                          => "Mél",
    "EMails"                         => "Méls",
    "Enterprise"                     => "Entreprise",
    "Entire content"                 => "Contenu entier",
    "Exact match"                    => "Phrase exacte",
    "Extented (feminine)"            => "Etendue",
    "External modules"               => "Modules externes",
    "fax"                            => "fax",
    "Fax"                            => "Fax",
    "Firstname"                      => "Prénom",
    "Fullname"                       => "Nom complet",
    "Help"                           => "Aide",
    "Home"                           => "Accueil",
    "ID"                             => "ID",
    "In price"                       => "Prix d'achat",
    "Inclusive Of Tax"               => "TTC", // must be an abbreviation
    "invoice"                        => "facture",
    "Invoice"                        => "Facture",
    "Invoices"                       => "Factures",
    "Item"                           => "Article",
    "Item modification"              => "Modification d'un article",
    "Items"                          => "Articles",
    "Lastname"                       => "Nom",
    "Legal status"                   => "Statut juridique",
    "Logged as"                      => "Utilisateur",
    "Login"                          => "Utilisateur",
    "Logo"                           => "Logo",
    "Logo path"                      => "Chemin du logo",
    "Logout"                         => "Sortir",
    "Mobile"                         => "Mob", // "phone", abbreviation
    "Month"                          => "Mois",
    "Name"                           => "Nom",
    "New category"                   => "Nouvelle categorie",
    "New contact"                    => "Nouveau contact",
    "New invoice"                    => "Nouvelle facture",
    "New item"                       => "Nouvel article",
    "New quotation"                  => "Nouveau devis",
    "New user"                       => "Nouvel utilisateur",
    "No entry"                       => "Aucune entrée",
    "Normal (feminine)"              => "Normale",
    "Number of references"           => "Nombre de références",
    "Occurrences"                    => "Occurrences",
    "on (date)"                      => "le",
    "Order by"                       => "Classer par",
    "Out price"                      => "Prix de vente",
    "Owner"                          => "Pocesseur",
    "Password"                       => "Mot de passe",
    "phone"                          => "tél", // abbreviation
    "Phone"                          => "Téléphone",
    "Postal code"                    => "Code postal",
    "Private"                        => "Privé",
    "Protected"                      => "Protégé",
    "Public"                         => "Publique",
    "Qty"                            => "Qtité", // abbreviation
    "Quantity"                       => "Quantité",
    "quotation"                      => "devis",
    "Quotation"                      => "Devis",
    "Quotations"                     => "Devis",
    "Ref"                            => "Réf", // abbreviation
    "Reference"                      => "Référence",
    "Result"                         => "Résultat",
    "Results"                        => "Résultats",
    "Search"                         => "Recherche",
    "Search engine"                  => "Moteur de recherche",
    "Search in"                      => "Chercher dans",
    "seconds"                        => "secondes",
    "Sessions log"                   => "Log des sessions",
    "Size"                           => "Taille",
    "Start stamp"                    => "Début",
    "Stock's alert thresholds"       => "Seuils d'alerte du stock",
    "Tax"                            => "Tax",
    "Tax Free"                       => "HT", // must be an abbreviation
    "Title"                          => "Titre",
    "Today"                          => "Aujourd'hui",
    "Total"                          => "Total",
    "Trade register"                 => "Siret",
    "Type"                           => "Type",
    "U"                              => "U", // "unit", abbreviation
    "Unit price"                     => "Prix unitaire",
    "User"                           => "Utilisateur",
    "User modification"              => "Modification d'un utilisateur",
    "User options"                   => "Options de l'utilisateur",
    "Users managing"                 => "Gestion des utilisateurs",
    "Validate"                       => "Valider",
    "Value"                          => "Valeur",
    "VAT"                            => "TVA", // Value Added Tax
    "View type"                      => "Type de vue",
    "Website"                        => "Oueb",
    "Year"                           => "Année",

    // Days
    "Monday"    => "Lundi",
    "Tuesday"   => "Mardi",
    "Wednesday" => "Mercredi",
    "Thursday"  => "Jeudi",
    "Friday"    => "Vendredi",
    "Saturday"  => "Samedi",
    "Sunday"    => "Dimanche",

    // Days abbreviated
    "Mon" => "Lun",
    "Tue" => "Mar",
    "Wed" => "Mer",
    "Thu" => "Jeu",
    "Fri" => "Ven",
    "Sat" => "Sam",
    "Sun" => "Dim",

    // Monthes
    "January"   => "Janvier",
    "February"  => "Février",
    "March"     => "Mars",
    "April"     => "Avril",
    "May"       => "Mai",
    "June"      => "Juin",
    "July"      => "Juillet",
    "August"    => "Août",
    "September" => "Septembre",
    "October"   => "Octobre",
    "November"  => "Novembre",
    "December"  => "Décembre",

    // Monthes abbreviated
    "Jan" => "Jan",
    "Feb" => "Fév",
    "Mar" => "Mar",
    "Apr" => "Avr",
    "May" => "Mai",
    "Jun" => "Jun",
    "Jul" => "Jul",
    "Aug" => "Aoû",
    "Sep" => "Sep",
    "Oct" => "Oct",
    "Nov" => "Nov",
    "Dec" => "Déc",

    // File size units
    "byte"  => "octet",
    "bytes" => "octets",
    "Kb"    => "Ko",
    "Mb"    => "Mo",
    "Gb"    => "Go",
    "Tb"    => "To",

    // Full sentences
    "File is not readable, please choose another file" => "Le fichier n'est pas lisible, choisissez un autre fichier",
    "File has been deleted, please re-choose a file"   => "Le fichier a été détruit, choisissez un fichier à nouveau",
    "No internal modules"                              => "Pas de modules internes",
    "Operation successfully executed"                  => "Opération effectuée avec succès",
    "Please choose a file"                             => "Choisissez un fichier",
    "Remember login informations next time"            => "Se souvenir du nom et du mot de passe la prochaine fois",
    "You are not authorized to modify this entry"      => "Vous n'êtes pas autorisé(e) à modifier cette entrée",

    // ???
    "APE" => "APE"
  )
);


//----------------------------------------------------------------------------
// Current language array
//----------------------------------------------------------------------------
$lang = $g_Translations[USER_LANGUAGE];



//****************************************************************************
//****************************************************************************
//
// Functions
//
//****************************************************************************
//****************************************************************************
//----------------------------------------------------------------------------
// TranslateDate
//----------------------------------------------------------------------------
function TranslateDate ($date_string)
{
  global $lang;

  if(USER_LANGUAGE == "English")
    return $date_string;

  // [JC] - Is there a faster method ???

  $date_string = eregi_replace("Monday", $lang["Monday"], $date_string);
  $date_string = eregi_replace("Tuesday", $lang["Tuesday"], $date_string);
  $date_string = eregi_replace("Wednesday", $lang["Wednesday"], $date_string);
  $date_string = eregi_replace("Thursday", $lang["Thursday"], $date_string);
  $date_string = eregi_replace("Friday", $lang["Friday"], $date_string);
  $date_string = eregi_replace("Saturday", $lang["Saturday"], $date_string);
  $date_string = eregi_replace("Sunday", $lang["Sunday"], $date_string);

  $date_string = eregi_replace("Mon", $lang["Mon"], $date_string);
  $date_string = eregi_replace("Tue", $lang["Tue"], $date_string);
  $date_string = eregi_replace("Wed", $lang["Wed"], $date_string);
  $date_string = eregi_replace("Thu", $lang["Thu"], $date_string);
  $date_string = eregi_replace("Fri", $lang["Fri"], $date_string);
  $date_string = eregi_replace("Sat", $lang["Sat"], $date_string);
  $date_string = eregi_replace("Sun", $lang["Sun"], $date_string);

  $date_string = eregi_replace("January", $lang["January"], $date_string);
  $date_string = eregi_replace("February", $lang["February"], $date_string);
  $date_string = eregi_replace("March", $lang["March"], $date_string);
  $date_string = eregi_replace("April", $lang["April"], $date_string);
  $date_string = eregi_replace("May", $lang["May"], $date_string);
  $date_string = eregi_replace("June", $lang["June"], $date_string);
  $date_string = eregi_replace("July", $lang["July"], $date_string);
  $date_string = eregi_replace("August", $lang["August"], $date_string);
  $date_string = eregi_replace("September", $lang["September"], $date_string);
  $date_string = eregi_replace("October", $lang["October"], $date_string);
  $date_string = eregi_replace("November", $lang["November"], $date_string);
  $date_string = eregi_replace("December", $lang["December"], $date_string);

  $date_string = eregi_replace("Jan", $lang["Jan"], $date_string);
  $date_string = eregi_replace("Feb", $lang["Feb"], $date_string);
  $date_string = eregi_replace("Mar", $lang["Mar"], $date_string);
  $date_string = eregi_replace("Apr", $lang["Apr"], $date_string);
  $date_string = eregi_replace("May", $lang["May"], $date_string);
  $date_string = eregi_replace("Jun", $lang["Jun"], $date_string);
  $date_string = eregi_replace("Jul", $lang["Jul"], $date_string);
  $date_string = eregi_replace("Aug", $lang["Aug"], $date_string);
  $date_string = eregi_replace("Sep", $lang["Sep"], $date_string);
  $date_string = eregi_replace("Oct", $lang["Oct"], $date_string);
  $date_string = eregi_replace("Nov", $lang["Nov"], $date_string);
  $date_string = eregi_replace("Dec", $lang["Dec"], $date_string);

  return $date_string;
}


endif;
?>
Return current item: Bradabra