src/Loader.php
public function detectlocale()
    {
        if (isset($GLOBALS['lang'])) {
            return $GLOBALS['lang'];
        } elseif (getenv('LC_ALL')) {
            return getenv('LC_ALL');
        } elseif (getenv('LC_MESSAGES')) {
            return getenv('LC_MESSAGES');
        } elseif (getenv('LANG')) {
            return getenv('LANG');
        }

        return 'en';
    }
public function detectlocale()
    {
        if (isset($GLOBALS['lang'])) {
            return $GLOBALS['lang'];
        } elseif (getenv('LC_ALL')) {
            return getenv('LC_ALL');
        } elseif (getenv('LC_MESSAGES')) {
            return getenv('LC_MESSAGES');
        } elseif (getenv('LANG')) {
            return getenv('LANG');
        }

        return 'en';
    }
public function detectlocale ( ) { if ( isset ( $ GLOBALS [ 'lang' ] ) ) { return $ GLOBALS [ 'lang' ] ; } elseif ( getenv ( 'LC_ALL' ) ) { return getenv ( 'LC_ALL' ) ; } elseif ( getenv ( 'LC_MESSAGES' ) ) { return getenv ( 'LC_MESSAGES' ) ; } elseif ( getenv ( 'LANG' ) ) { return getenv ( 'LANG' ) ; } return 'en' ; }
Detects currently configured locale.

It checks:

- global lang variable
- environment for LC_ALL, LC_MESSAGES and LANG

@return string with locale name
Detects currently configured locale .