Property | Type | Description | |
---|---|---|---|
$app | Illuminate\Container\Container | The IoC Container | |
$domain | string | The translation domain | |
$encoding | string | The localization encoding |
Method | Description | |
---|---|---|
__construct ( Illuminate\Container\Container $app ) | Build the language class | |
active ( string $locale ) : boolean | Whether a given language is the current one | |
defaultLocale ( ) : string | Get the default locale | |
fallbackLocale ( ) : string | Get the fallback locale | |
get ( string $key, array $replace = [], string $locale = null ) : string | Get the translation for the given key, or fallback to fallback locale | |
getAvailable ( ) : array | Get all available languages | |
getDomain ( ) : string | Get the translation domain | |
getEncoding ( boolean $slug = false ) : string | Get the encoding | |
getInternalLocale ( ) : string | Get the internal locale | |
getLocaleFolder ( string $locale ) : string | Get the folder where a locale's translations reside | |
getShortInternalLocale ( ) : string | Get the short version of the internal locale | |
getTranslationsFolder ( string $subfolder = null ) : string | Get the folder where the translations reside | |
sanitize ( string $locale = null ) : string | Sanitize a locale | |
setInternalLocale ( string | boolean $locale = false ) : string | Sets the locale according to the current language | |
setLocale ( string $locale ) : string | Change the current language | |
shortToLongLocale ( string $locale ) : string | Translate a short locale to long (en => en_US) | |
valid ( string $locale ) : boolean | Check whether a language is valid or not |
public __construct ( Illuminate\Container\Container $app ) | ||
$app | Illuminate\Container\Container |
public defaultLocale ( ) : string | ||
return | string |
public fallbackLocale ( ) : string | ||
return | string |
public getAvailable ( ) : array | ||
return | array | An array of languages |
public getEncoding ( boolean $slug = false ) : string | ||
$slug | boolean | |
return | string |
public getInternalLocale ( ) : string | ||
return | string |
public getLocaleFolder ( string $locale ) : string | ||
$locale | string | |
return | string |
public getShortInternalLocale ( ) : string | ||
return | string |
public getTranslationsFolder ( string $subfolder = null ) : string | ||
$subfolder | string | |
return | string |
public shortToLongLocale ( string $locale ) : string | ||
$locale | string | |
return | string |
protected Container,Illuminate\Container $app | ||
return | Illuminate\Container\Container |