Login   Register  
PHP Classes
elePHPant
Icontem

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 Example   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2014-11-25 (1 month ago) RSS 2.0 feedNot yet rated by the usersTotal: 377 This week: 1All time: 6,087 This week: 1,134Up
Version License PHP version Categories  
language-detector 2.1.0Free To Use But Restricted5.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: 11795 in Hong Kong Hong Kong
Week rank: 343 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:377All time:6,087
 This week:1This week:1,134Up