PHP Class Devise\Languages\LanguageDetector

Exibir arquivo Open project: devisephp/cms Class Usage Examples

Protected Properties

Property Type Description
$Language Protected fields for this class
$LocaleDetector Protected fields for this class

Public Methods

Method Description
__construct ( LocaleDetector $LocaleDetector, DvsLanguage $Language, $Config = null ) Create a new Language Detector
current ( ) : Language Get the current language for the locale this will probably use the cookie as default
primaryLanguageId ( ) : integer Returns the primary language id for this system
universal ( ) : Language Get the universal language that we fallback to.
update ( Language $language ) : void Update the current language for this browser

Method Details

__construct() public method

Create a new Language Detector
public __construct ( LocaleDetector $LocaleDetector, DvsLanguage $Language, $Config = null )
$LocaleDetector LocaleDetector
$Language DvsLanguage

current() public method

Get the current language for the locale this will probably use the cookie as default
public current ( ) : Language
return Language

primaryLanguageId() public method

Returns the primary language id for this system
public primaryLanguageId ( ) : integer
return integer

universal() public method

.. which is likely english because that is the default in laravel's Config::get(app.locale)
public universal ( ) : Language
return Language

update() public method

Update the current language for this browser
public update ( Language $language ) : void
$language Language
return void

Property Details

$Language protected_oe property

Protected fields for this class
protected $Language

$LocaleDetector protected_oe property

Protected fields for this class
protected $LocaleDetector