메소드 |
설명 |
|
__construct ( Framework $Framework ) |
Construct a new LocaleDetector |
|
cookie ( ) : string |
Get the locale from a cookie |
|
current ( ) : string |
Get the current locale. At first we try
to use the cookie if one is set. If a cookie
is not set then we attempt to deduce the locale
in this order: url segment, http headers, and finally
we fall back to the universal locale which is
set in laravel's app.locale (defaults to en). |
|
header ( ) : string |
Get locale from header accept string |
|
segment ( ) : string |
We don't use this, but we could use it later
if we wanted to. It would get the locale
from the first segment of the url, e.g. |
|
universal ( ) : string |
Get the universal locale set by developer and laravel |
|
update ( string $locale ) : string |
Updates the locale stored in this cookie |
|