LanguageDetector
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
Create a new Language Detector
Get the current language for the locale this will probably use the cookie as default
Get the universal language that we fallback to.
Update the current language for this browser
Returns the primary language id for this system
Details
at line 25
__construct(LocaleDetector $LocaleDetector, DvsLanguage $Language, $Config = null)
Create a new Language Detector
at line 38
Language
current()
Get the current language for the locale this will probably use the cookie as default
at line 63
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
void
update(Language $language)
Update the current language for this browser
at line 87
integer
primaryLanguageId()
Returns the primary language id for this system