src/Language.php
public function getBestFromClient() {
		// get all language keys from client
		$client_langs = $this->getFromClient();

		foreach ($client_langs as $client_lang) {
			foreach ($this->_possible as $possible) {
				$l10n = $this->getL10n($possible);

				if (in_array($client_lang, $l10n['keys'])) {
					return $client_lang;
				}
			}
		}
	}
public function getBestFromClient() {
		// get all language keys from client
		$client_langs = $this->getFromClient();

		foreach ($client_langs as $client_lang) {
			foreach ($this->_possible as $possible) {
				$l10n = $this->getL10n($possible);

				if (in_array($client_lang, $l10n['keys'])) {
					return $client_lang;
				}
			}
		}
	}
public function getBestFromClient ( ) { // get all language keys from client $ client_langs = $ this -> getFromClient ( ) ; foreach ( $ client_langs as $ client_lang ) { foreach ( $ this -> _possible as $ possible ) { $ l10n = $ this -> getL10n ( $ possible ) ; if ( in_array ( $ client_lang , $ l10n [ 'keys' ] ) ) { return $ client_lang ; } } } }
Determines the best language according to the users browser settings.
@return `string` A valid language key.
Determines the best language according to the users browser settings .