src/Ease/Locale.php
public static function useLocale($localeCode)
    {
        \setlocale(LC_ALL, $localeCode);
        \bind_textdomain_codeset(self::$textDomain, 'UTF-8');
        \putenv("LC_ALL=$localeCode");
        if (file_exists(self::$i18n)) {
            \bindtextdomain(self::$textDomain, self::$i18n);
        }
        \textdomain(self::$textDomain);
        if (isset($_SESSION)) {
            $_SESSION['locale'] = $localeCode;
        }
        self::$localeUsed = $localeCode;
    }
public static function useLocale($localeCode)
    {
        \setlocale(LC_ALL, $localeCode);
        \bind_textdomain_codeset(self::$textDomain, 'UTF-8');
        \putenv("LC_ALL=$localeCode");
        if (file_exists(self::$i18n)) {
            \bindtextdomain(self::$textDomain, self::$i18n);
        }
        \textdomain(self::$textDomain);
        if (isset($_SESSION)) {
            $_SESSION['locale'] = $localeCode;
        }
        self::$localeUsed = $localeCode;
    }
Use Effective locale to requested

@param string $localeCode locale code to use

@return string used locale code