Property | Type | Description | |
---|---|---|---|
$currentLocale | string | Current locale. | |
$defaultLocale | string | Default locale. | |
$locales | Arcanedev\Localization\Entities\LocaleCollection | ||
$supportedLocales | Arcanedev\Localization\Entities\LocaleCollection |
Method | Description | |
---|---|---|
__construct ( Illuminate\Foundation\Application $app ) | Create LocaleManager instance. | |
getAllLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection | Get all locales. | |
getCurrentLocale ( ) : string | Returns current language. | |
getCurrentLocaleEntity ( ) : Arcanedev\Localization\Entities\Locale | Get the current locale entity. | |
getCurrentOrDefaultLocale ( ) : string | Get current or default locale. | |
getDefaultLocale ( ) : string | Get the default locale. | |
getSupportedLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection | Get supported locales. | |
getSupportedLocalesKeys ( ) : array | Get supported locales keys. | |
isDefaultLocaleHiddenInUrl ( ) : boolean | Hide the default locale in URL ?? | |
isDefaultLocaleSupported ( $defaultLocale ) | Check if default is supported. | |
isSupportedLocale ( string $locale ) : boolean | Check if locale is supported. | |
setCurrentLocale ( string $currentLocale ) : self | Set the current locale. | |
setDefaultLocale ( string $defaultLocale = null ) : self | Set the default locale. | |
setLocale ( string | null $locale = null ) : string | Set and return current locale. | |
setSupportedLocales ( array $supportedLocales ) : self | Set supported locales. |
Method | Description | |
---|---|---|
config ( ) : Illuminate\Config\Repository | Get config repository. | |
filterLocales ( array $supportedLocales ) : Arcanedev\Localization\Entities\LocaleCollection | Filter locale collection. | |
getConfig ( string $name, mixed $default = null ) : mixed | Get localization config. | |
load ( ) | Load all locales data. | |
negotiateLocale ( ) : string | Get negotiated locale. | |
request ( ) : Illuminate\Http\Request | Get config repository. | |
updateRegional ( ) | Update locale regional. | |
useAcceptLanguageHeader ( ) : boolean | Returns the translation key for a given path. |
public __construct ( Illuminate\Foundation\Application $app ) | ||
$app | Illuminate\Foundation\Application |
public getAllLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection | ||
return | Arcanedev\Localization\Entities\LocaleCollection |
public getCurrentLocale ( ) : string | ||
return | string |
public getCurrentLocaleEntity ( ) : Arcanedev\Localization\Entities\Locale | ||
return | Arcanedev\Localization\Entities\Locale |
public getCurrentOrDefaultLocale ( ) : string | ||
return | string |
public getDefaultLocale ( ) : string | ||
return | string |
public getSupportedLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection | ||
return | Arcanedev\Localization\Entities\LocaleCollection |
public getSupportedLocalesKeys ( ) : array | ||
return | array |
public isDefaultLocaleHiddenInUrl ( ) : boolean | ||
return | boolean |
public isDefaultLocaleSupported ( $defaultLocale ) |
public isSupportedLocale ( string $locale ) : boolean | ||
$locale | string | |
return | boolean |
public setCurrentLocale ( string $currentLocale ) : self | ||
$currentLocale | string | |
return | self |
public setDefaultLocale ( string $defaultLocale = null ) : self | ||
$defaultLocale | string | |
return | self |
public setSupportedLocales ( array $supportedLocales ) : self | ||
$supportedLocales | array | |
return | self |
protected LocaleCollection,Arcanedev\Localization\Entities $locales | ||
return | Arcanedev\Localization\Entities\LocaleCollection |