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
- Host: GitHub
- URL: https://github.com/mul14/lang-detector
- Owner: mul14
- Created: 2016-08-16T01:45:19.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-08-16T01:45:55.000Z (almost 9 years ago)
- Last Synced: 2024-12-31T08:34:37.407Z (5 months ago)
- Topics: language-detector, laravel-package
- Language: PHP
- Homepage: https://packagist.org/packages/nasution/lang-detector
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.
```