Creation a multilingual website with "translate php class"

Choose the desired language

Translated text (example)

"Translate" is a very simple an easy to implement php class. Only 3 lines of code are enough to prepare your website to show different languages:

		require_once ('Translate/Translate_class.php');
		$translate = new translate();
		$translate->setBrowserLanguage();

Major Features

The following public functions are not translated because they are an inherit class function "showAllPublicfunctions();"...

Public functions of php class 'translate'

setBrowserLanguage()
This function determines the browser language and tries to load the corresponding language file. If the file does not exist the php class uses the fallback language (defined in the Translate_class.php). There is no return value.
setLanguage()
Instead of determin the browser language the webmaster can define the used language manually. Not matter of the language of the user this language file is used. If the file does not exist the php class uses the fallback language. There is no return value.
getLanguageByIP()
Translate can try to resolve the IP address of the user and to determine the country of origin. Please be aware that this function needs some time because it reads an array with more than 11.000 lines. The input variable can be 2, 3 or 4:
  > 2 return a two letter country code like 'us'.
  > 3 return three letters like 'usa'
  > 4 return the complete name like 'UNITED STATES OF AMERICA'.
getCurrentLanguage()
This function returns a string with the currently used language. For example: 'en' or 'de'.
getLanguageFilesInDirectory()
This function returns an array with all found language files in the folder of the Translate_class.php. For example: array('lang_en.php', 'lang_de.php').
getAllLanguages()
This function returns an array with all found languages in the folder of the Translate_class.php. For example: array('en', 'de').
_($keyword, $replaceArray = '')
This is the central function to return a string with the text piece corresponding to the keyword. In addition it is possible to replace placeholders in the text with another text piece. Imagine the keyword for 'welcome' is 'Hello #surname# #name#'. In this case the usage could be: echo $translate->_('welcome', array('#surname#=>'Christoph', '#name#=>'Dyllick-Brenzinger').
showAllTextsAndKeywords()
This is one of the three supporting function and shows a table with all keywords and text pieces of the currently selected language.
showAllTexts()
This is the second of three supporting functions and shows only the text pieces without the keywords.
showAllPublicFunctions()
Shows all public functions of this php class. (If you read this you are currently using this function...)
compareLanguageFileWithFallback()
This is the last supporting function which compaires the de...