Property | Type | Description | |
---|---|---|---|
$translator | Xinax\LaravelGettext\Translators\TranslatorInterface | Translator handler |
Method | Description | |
---|---|---|
__construct ( Xinax\LaravelGettext\Translators\TranslatorInterface $gettext ) | ||
getDomain ( ) : string | Returns the current domain | |
getEncoding ( ) : string | Get the current encoding | |
getLocale ( ) : string | Gets the Current locale. | |
getLocaleLanguage ( string | null $locale = null ) : string | null | Get the language portion of the locale (ex. en_GB returns en) | |
getSelector ( array $labels = [] ) : |
Get the language selector object | |
getSupportedLocales ( ) : array | Returns supported locales | |
getTranslator ( ) : Xinax\LaravelGettext\Translators\TranslatorInterface | Returns the translator. | |
isLocaleSupported ( $locale ) : boolean | Indicates if given locale is supported | |
setDomain ( string $domain ) | Sets the current domain | |
setEncoding ( string $encoding ) | Set the current encoding | |
setLocale ( string $locale ) | Set current locale | |
setTranslator ( Xinax\LaravelGettext\Translators\TranslatorInterface $translator ) | Sets the translator | |
translate ( $message ) : string | Translates a message with the current handler | |
translatePlural ( $singular, $plural, $count ) : string | Translates a plural string with the current handler |
public __construct ( Xinax\LaravelGettext\Translators\TranslatorInterface $gettext ) | ||
$gettext | Xinax\LaravelGettext\Translators\TranslatorInterface |
public getSelector ( array $labels = [] ) : |
||
$labels | array | |
return |
public getSupportedLocales ( ) : array | ||
return | array |
public getTranslator ( ) : Xinax\LaravelGettext\Translators\TranslatorInterface | ||
return | Xinax\LaravelGettext\Translators\TranslatorInterface |
public isLocaleSupported ( $locale ) : boolean | ||
return | boolean |
public setEncoding ( string $encoding ) | ||
$encoding | string |
public setTranslator ( Xinax\LaravelGettext\Translators\TranslatorInterface $translator ) | ||
$translator | Xinax\LaravelGettext\Translators\TranslatorInterface |
public translatePlural ( $singular, $plural, $count ) : string | ||
$singular | ||
$plural | ||
$count | ||
return | string |