PHP Classes

PHP Multilanguage Site: Display texts translated into several languages

Recommend this page to a friend!
  Info   View files Documentation   View files View files (56)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2023-06-13 (11 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 127 All time: 9,399 This week: 79Up
Version License PHP version Categories
multilingual_page 1.0MIT/X Consortium ...5Localization, PHP 5, Text processing, T...
Description 

Author

This package can display texts translated into several languages.

It can read a text file with a list of texts in a given language and then execute a script displaying the reader on an HTML Web page.

The package provides different scripts that display instructions pages like read-me documents, menus, or panels.

Innovation Award
PHP Programming Innovation award nominee
June 2023
Number 6
Many developers need to create sites that should be available to their users in several languages.

This way, sites can be helpful to more users of many world countries.

This package provides three types of ready-to-use template scripts that can render texts from translation files differently.

Manuel Lemos
Picture of Alexander Eist
Name: Alexander Eist <contact>
Classes: 3 packages by
Country: Czech Republic
Age: 73
All time rank: 39413 in Czech Republic
Week rank: 298 Up2 in Czech Republic Up
Innovation award
Innovation award
Nominee: 2x

Documentation

Read Me English This file explain How to use the language panel package... 1 Requirement: 1.1 HTTP-server like Appache 1.2 PHP server version 5.xx and later 2 Installation 2.1 Install this script into your site like it is in this example - 'index.php' 2.2 create the default language list in the file 'languages/en.txt', where place every label you need to translate into other language 2.3 edit the array $langs and place there all available languages, variable locates in the file 'lang_panel.php'. 2.4 edit the array $lang_title and add need language names, variable locates in the file 'lang_panel.php'. 3 First start program 3.1 Start programm. 3.1.1 Only one current language flag will be show. 3.1.2 Full gallery of languages flags is hidden until the user click on a current language flag. 3.2 Click on a current language flag the full avalabel language flags will appear. 3.3 Clickw on selected language flag will change the Global variable $lng to new language value. And page will relaoad with hidden glag gallery and show new language flag only. 3.4 If file with name '&lt;language code&gt;.txt' do not exists the script automatically creates the copy of default language file with new language name and shows the message about it. 4 click every language-flag you add. In result the script automatically creates the full complete of the files translate to. Every new files will have the same text like the default language list in default language file (usually en.txt). 4.1 After you have all files for translate labels from default language you can copy sequently copy the text from appropriate file '&lt;language code&gt;.txt' and sent it to translatlor. 4.2 Insert in the new language file the translated text STRONGLY INTO THE SAME NUMBERS OF ROW 5 What to do if... 5.1 What to do if in the selected new language the labels show incorrect? Answer: 5.1.1 Check the numbers of translated words. The every translated word must be locate strongly in the same rows like in the default language file 5.2 What to do if every languages labels placed incorrect? Answer: 5.1.2 Check the numbers of rows in the default language file (usually 'language/en.txt') and bring that into line with the php script uses it. 5.1.3 After the default language will show correct labels edit all other languages files to harmonize that with default language file; IMPORTANT NOTE: The translated text must be locates strongly in the SAME ROWS like in the default language file. Therefore for control it you must to use the editor with show string numberes.

  Files folder image Files  
File Role Description
Files folder imageassets (2 directories)
Files folder imagelanguages (3 files)
Files folder imagereadme (3 files)
Accessible without login Plain text file index.php Appl. Application script
Accessible without login Plain text file lang_panel.php Appl. class lang_panel
Plain text file lang_panel_debugged.php Class debugged src for multilingual page
Accessible without login Plain text file menu_up.php Appl. Application script
Accessible without login Plain text file ReadMe.php Appl. Display the readme texts

  Files folder image Files  /  assets  
File Role Description
Files folder imageimages (1 directory)
Files folder imagestyle (1 file)

  Files folder image Files  /  assets  /  images  
File Role Description
Files folder imageflags (44 files)

  Files folder image Files  /  assets  /  images  /  flags  
File Role Description
  Accessible without login Image file ar.png Icon debugged src for multilingual page
  Accessible without login Image file az.png Icon debugged src for multilingual page
  Accessible without login Image file by.png Icon debugged src for multilingual page
  Accessible without login Image file cat.png Icon debugged src for multilingual page
  Accessible without login Image file cn.png Icon debugged src for multilingual page
  Accessible without login Image file cz.png Icon debugged src for multilingual page
  Accessible without login Image file de.png Icon debugged src for multilingual page
  Accessible without login Image file ee.png Icon debugged src for multilingual page
  Accessible without login Image file en.png Icon debugged src for multilingual page
  Accessible without login Image file es.png Icon debugged src for multilingual page
  Accessible without login Image file fr.png Icon debugged src for multilingual page
  Accessible without login Image file ge.png Icon debugged src for multilingual page
  Accessible without login Image file gr.png Icon debugged src for multilingual page
  Accessible without login Image file il.png Icon debugged src for multilingual page
  Accessible without login Image file in.png Icon debugged src for multilingual page
  Accessible without login Image file iq.png Icon debugged src for multilingual page
  Accessible without login Image file is.png Icon debugged src for multilingual page
  Accessible without login Image file it.png Icon debugged src for multilingual page
  Accessible without login Image file j.png Icon debugged src for multilingual page
  Accessible without login Image file jp.png Icon debugged src for multilingual page
  Accessible without login Image file kg.png Icon debugged src for multilingual page
  Accessible without login Image file kh.png Icon debugged src for multilingual page
  Accessible without login Image file kp.png Icon debugged src for multilingual page
  Accessible without login Image file kr.png Icon debugged src for multilingual page
  Accessible without login Image file kz.png Icon debugged src for multilingual page
  Accessible without login Image file lt.png Icon debugged src for multilingual page
  Accessible without login Image file lv.png Icon debugged src for multilingual page
  Accessible without login Image file md.png Icon debugged src for multilingual page
  Accessible without login Image file ml.png Icon debugged src for multilingual page
  Accessible without login Image file ng.png Icon debugged src for multilingual page
  Accessible without login Image file pa.png Icon debugged src for multilingual page
  Accessible without login Image file pe.png Icon debugged src for multilingual page
  Accessible without login Image file pk.png Icon debugged src for multilingual page
  Accessible without login Image file pl.png Icon debugged src for multilingual page
  Accessible without login Image file pt.png Icon debugged src for multilingual page
  Accessible without login Image file ro.png Icon debugged src for multilingual page
  Accessible without login Image file ru.png Icon debugged src for multilingual page
  Accessible without login Image file sl.png Icon debugged src for multilingual page
  Accessible without login Image file sy.png Icon debugged src for multilingual page
  Accessible without login Image file tj.png Icon debugged src for multilingual page
  Accessible without login Image file tr.png Icon debugged src for multilingual page
  Accessible without login Image file ua.png Icon debugged src for multilingual page
  Accessible without login Image file uz.png Icon debugged src for multilingual page
  Accessible without login Image file vn.png Icon debugged src for multilingual page

  Files folder image Files  /  assets  /  style  
File Role Description
  HTML file style.css Class css file for package

  Files folder image Files  /  languages  
File Role Description
  Accessible without login Plain text file cz.txt Data Application texts
  Accessible without login Plain text file en.txt Data Application texts
  Accessible without login Plain text file ru.txt Data Application texts

  Files folder image Files  /  readme  
File Role Description
  Accessible without login Plain text file ReadMe_cz.txt Doc. Read me
  Accessible without login Plain text file ReadMe_en.txt Doc. Read me
  Accessible without login Plain text file ReadMe_ru.txt Doc. Read me

 Version Control Unique User Downloads Download Rankings  
 0%
Total:127
This week:0
All time:9,399
This week:79Up