christophdb supports this item


This author's response time can be up to 2 business days.

Popular questions for this item

How does a language file look like? Here is an example:

$this->TXT['h1'] = 'Creation a multilingual website with "translate php class"';
$this->TXT['h3_1'] = 'Choose the desired language';
$this->TXT['h3_2'] = 'Translated text (example)';
$this->TXT['h3_3'] = 'Major Features';
$this->TXT['text1'] = '"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:';
$this->TXT['feature1'] = 'Ready to use with 3 lines of code';
$this->TXT['feature2'] = 'easy to extend with new languages (just copy an existing language file)';
$this->TXT['feature3'] = 'simple structure (translate_class.php and the language files.)';
$this->TXT['feature4'] = 'no errors because of a defined fallback language';
$this->TXT['feature5'] = 'detects the browser language of the user automatically or via IP-address';
$this->TXT['feature6'] = 'text parts can contain placeholders for variables';
$this->TXT['notTranslated'] = 'The following public functions are not translated because they are an inherit class function "showAllPublicfunctions();"...';

Is this translate class capable to translate my webpage on the fly without any further preparation?

Definately NO. This php class needs language files you have to provide and makes sure that the correct text snippet is shown depending of the selected language.

A minimal usage of this class need at least an index.php, the translate_class.php and minimum one language file.

index.php: echo $translate->_(‘hello-world’);

lang_en.php: $this->TXT[‘hello-world’] = “hello world in english”;

lang_de.php: $this->TXT[‘hello-world’] = “hallo welt auf deutsch”;

How many languages are supported by this php class?

This is the wrong question. This php class CAN support every language you can imagine. But the important thing is that you have to define the language files with all the translated text snippets.

Contact the author

This author provides limited support for this item through this item's comments.

Item support includes:

  • Availability of the author to answer questions
  • Answering technical questions about item’s features
  • Assistance with reported bugs and issues
  • Help with included 3rd party assets

However, item support does not include:

  • Customization services
  • Installation services

View the item support policy