PHP Classes

PHP Language Change: Change application language using arrays of text

Recommend this page to a friend!
  Info   View files Example   View files View files (6)   DownloadInstall with Composer Download .zip   Reputation   Support forum (1)   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 95 All time: 9,797 This week: 129Up
Version License PHP version Categories
language-change 1.0Freeware5Localization, PHP 5


This is a simple class that can change application language using arrays of text.

It can check if a cookie is set to determine the current language to be used for the texts in a site. If the cookie is not set, the class redirects the current request to access a script that sets the language cookie.

When the language cookie is set the class can load a script that defines an array with texts for the application to use in the language that was set.

In Spanish:

Este script puede cambiar el idioma de algunas palabras de tu pagina en tomando como parametro el valor de una cookie. Devuelve un array con las palabras en el idioma preferido.

Picture of Dannel
  Performance   Level  
Name: Dannel <contact>
Classes: 9 packages by
Country: Cuba Cuba
Age: 30
All time rank: 30538 in Cuba Cuba
Week rank: 410 Up2 in Cuba Cuba Up
Innovation award
Innovation award
Nominee: 5x

  Files folder image Files  
File Role Description
Files folder imagesrc (3 files)
Accessible without login Plain text file example.php Example Main example
Accessible without login Plain text file language.change.php Aux. Lang script to change cookie
Accessible without login Plain text file language.set.php Aux. Lang script to set the cookie

  Files folder image Files  /  src  
File Role Description
  Accessible without login Plain text file arrayeng.php Conf. Array include
  Accessible without login Plain text file arrayesp.php Conf. Array include
  Plain text file langclass.php Class Class

 Version Control Unique User Downloads Download Rankings  
This week:0
All time:9,797
This week:129Up
User Comments (1)
sorry but is no longer abel now.
3 years ago (Viktor)