An open API service indexing awesome lists of open source software.

https://github.com/mul14/lang-detector

Detect browser language
https://github.com/mul14/lang-detector

language-detector laravel-package

Last synced: 3 months ago
JSON representation

Detect browser language

Awesome Lists containing this project

README

        

# Language Detector

This is just very simple language detector by using `$_SERVER['HTTP_ACCEPT_LANGUAGE']`.
The output will be standard [ISO 639-1](https://en.wikipedia.org/wiki/ISO_639-1).

## Installation

```
composer require nasution/lang-detector
```

## Usage

```php
require 'vendor/autoload.php';

use Nasution\LangDetector;

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