Skip to content

mul14/lang-detector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Language Detector

This is just very simple language detector by using $_SERVER['HTTP_ACCEPT_LANGUAGE']. The output will be standard ISO 639-1.

Installation

composer require nasution/lang-detector

Usage

require 'vendor/autoload.php';

use Nasution\LangDetector;

echo LangDetector::detect(); // Output: id, en, it, ja, my, ms.