diversen/get-browser-language

Single method that gets a browsers language, using Zend_Locale

v1.0.2 2016-06-16 12:33 UTC

This package is auto-updated.

Last update: 2024-10-20 08:12:40 UTC


README

get-browser-language

Uses zend locale to get browser language

Install:

composer require diversen/get-browser-language

Usage:

use diversen\getBrowserLanguage;

try {
    $ary = getBrowserLanguage::asArray();
    print_r($ary);
    // Array ( [language] => en [language_long] => en_US )
} catch (Exception $e) {
    echo $e->getMessage();
}