Method |
Description |
|
__construct ( Illuminate\Foundation\Application $app, Arcanedev\Localization\Contracts\RouteTranslatorInterface $routeTranslator, Arcanedev\Localization\Contracts\LocalesManagerInterface $localesManager ) |
Creates new instance. |
|
createUrlFromUri ( string $uri ) : string |
Create an url from the uri. |
|
getAllLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection |
Get all locales. |
|
getCurrentLocale ( ) : string |
Returns current language. |
|
getCurrentLocaleDirection ( ) : string |
Returns current locale direction. |
|
getCurrentLocaleEntity ( ) : Arcanedev\Localization\Entities\Locale |
Returns current language. |
|
getCurrentLocaleName ( ) : string |
Returns current locale name. |
|
getCurrentLocaleNative ( ) : string |
Returns current locale native name. |
|
getCurrentLocaleRegional ( ) : string |
Returns current locale regional. |
|
getCurrentLocaleScript ( ) : string |
Returns current locale script. |
|
getDefaultLocale ( ) : string |
Returns default locale. |
|
getLocalizedURL ( string | null $locale = null, string | null $url = null, array $attributes = [] ) : string | false |
Returns an URL adapted to $locale or current locale. |
|
getNonLocalizedURL ( string | null $url = null ) : string |
It returns an URL without locale (if it has it). |
|
getSupportedLocales ( ) : Arcanedev\Localization\Entities\LocaleCollection |
Return an array of all supported Locales. |
|
getSupportedLocalesKeys ( ) : array |
Get supported locales keys. |
|
getUrlFromRouteName ( string $locale, string $transKey, array $attributes = [] ) : string | false |
Returns an URL adapted to the route name and the locale given. |
|
isDefaultLocaleHiddenInUrl ( ) : boolean |
Hide the default locale in URL ?? |
|
isLocaleSupported ( string | boolean $locale ) : boolean |
Check if Locale exists on the supported locales collection. |
|
localesNavbar ( ) : string |
Get locales navigation bar. |
|
localizeURL ( string | null $url = null, string | null $locale = null ) : string |
Returns an URL adapted to $locale or current locale. |
|
setBaseUrl ( string $url ) : self |
Sets the base url for the site. |
|
setLocale ( string | null $locale = null ) : string |
Set and return current locale. |
|
setRouteNameFromRequest ( Illuminate\Http\Request $request ) |
Set route name from request. |
|
setSupportedLocales ( array $supportedLocales ) : self |
Set the supported locales. |
|
transRoute ( string $routeName ) : string |
Translate routes and save them to the translated routes array (used in the localize route filter). |
|