Login   Register  
PHP Classes
elePHPant
Icontem

Colossal Mind Language Detector: Detect the preferred language of the user

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2013-10-07 (10 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 324 This week: 1All time: 6,383 This week: 1,503Up
Version License PHP version Categories  
cm-lang-detector 1.4.1GNU General Public Lice...5.0Localization, HTTP, PHP 5
Description Author  

This class can detect the preferred language of the user accessing the site.

It can look at the HTTP request accept header and determine the preferred language of the user from a list of supported languages.

The detected language can fallback to a language associated to the user country in case the Accept header is not sent by the browser.

The detected language can be stored in a cookie to avoid needing to detect the language again in subsequent requests.

Picture of Peter Kahl
Name: Peter Kahl <contact>
Classes: 5 packages by
Country: Hong Kong Hong Kong
Age: ???
All time rank: 12095 in Hong Kong Hong Kong
Week rank: 478 Up2 in Hong Kong Hong Kong Up
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Plain text file class.language-detector.php Class Class
Plain text file example-1.php Example Simple application, instructions.
Plain text file example-2.php Example Shows practical application on web page.
Plain text file README.md Doc. Readme

 Version Control Unique User Downloads Download Rankings  
 0%Total:324All time:6,383
 This week:1This week:1,503Up