class LanguageDetector
Language detector is used to determine the current and universal languages for this system.
It uses LocaleDetector to get the universal code, i.e 'en', 'es', and then fetches the DvsLanguage from the database
Methods
|
__construct(LocaleDetector $LocaleDetector, DvsLanguage $Language, $Config = null)
Create a new Language Detector |
||
| Language |
current()
Get the current language for the locale this will probably use the cookie as default |
|
| Language |
universal()
Get the universal language that we fallback to... |
|
| void |
update(Language $language)
Update the current language for this browser |
|
| integer |
primaryLanguageId()
Returns the primary language id for this system |
Details
at line 25
public
__construct(LocaleDetector $LocaleDetector, DvsLanguage $Language, $Config = null)
Create a new Language Detector
at line 38
public Language
current()
Get the current language for the locale this will probably use the cookie as default
at line 63
public Language
universal()
Get the universal language that we fallback to...
which is likely english because that is the default in laravel's Config::get(app.locale)
at line 77
public void
update(Language $language)
Update the current language for this browser
at line 87
public integer
primaryLanguageId()
Returns the primary language id for this system