Login   Register  
PHP Classes

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 (11 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 325 All time: 6,391 This week: 1,546Up
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: 12065 in Hong Kong Hong Kong
Week rank: 324 Up1 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:325All time:6,391
 This week:0This week:1,546Up