nasution/lang-detector

Detect user language

0.0.1 2016-08-16 01:43 UTC

This package is auto-updated.

Last update: 2024-05-10 09:34:05 UTC


README

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.