Méthode | Description | |
---|---|---|
__call ( string $name, array $args ) : mixed | Call to undefined method. | |
__callStatic ( string $name, array $args ) : mixed | Call to undefined static method. | |
__construct ( Kdyby\Translation\IUserLocaleResolver $localeResolver, Symfony\Component\Translation\MessageSelector $selector, |
||
__get ( string $name ) : mixed | Returns property value. Do not call directly. | |
__isset ( string $name ) : boolean | Is property defined? | |
__set ( string $name, mixed $value ) : void | Sets value of a property. Do not call directly. | |
__unset ( string $name ) : void | Access to undeclared property. | |
addLoader ( string $format, Symfony\Component\Translation\Loader\LoaderInterface $loader ) | ||
addResource ( $format, $resource, $locale, $domain = NULL ) | ||
buildWhitelistRegexp ( null | string $whitelist ) : null | string | ||
createTemplateHelpers ( ) : |
||
domain ( string $messagePrefix ) : ITranslator | ||
extensionMethod ( $name, null $callback = NULL ) : callable | null | Adding method to class. | |
getAvailableLocales ( ) : array | Returns array of locales from given resources | |
getDefaultLocale ( ) : string | ||
getLocale ( ) | ||
getReflection ( ) : |
Access to reflection. | |
injectPanel ( |
||
injectPsrLogger ( Psr\Log\LoggerInterface $logger = NULL ) | ||
setDefaultLocale ( string $locale ) : |
||
setFallbackLocales ( array $locales ) | ||
setLocaleWhitelist ( array $whitelist = NULL ) : |
||
trans ( $message, array $parameters = [], $domain = NULL, $locale = NULL ) | ||
transChoice ( $message, $number, array $parameters = [], $domain = NULL, $locale = NULL ) | ||
translate ( string $message, integer $count = NULL, array $parameters = [], string $domain = NULL, string $locale = NULL ) : string | Translates the given string. |
Méthode | Description | |
---|---|---|
assertValidLocale ( string $locale ) | Asserts that the locale is valid, throws an Exception if not. | |
computeFallbackLocales ( $locale ) | ||
getLoaders ( ) : Symfony\Component\Translation\Loader\LoaderInterface[] | ||
loadCatalogue ( $locale ) | ||
logMissingTranslation ( string $message, string $domain, string $locale ) |
Méthode | Description | |
---|---|---|
extractMessageDomain ( string $message ) : array |
public __construct ( Kdyby\Translation\IUserLocaleResolver $localeResolver, Symfony\Component\Translation\MessageSelector $selector, |
||
$localeResolver | Kdyby\Translation\IUserLocaleResolver | |
$selector | Symfony\Component\Translation\MessageSelector | The message selector for pluralization |
$catalogueCompiler | ||
$fallbackResolver | ||
$loader | Kdyby\Translation\IResourceLoader |
protected assertValidLocale ( string $locale ) | ||
$locale | string | Locale to tests |
public createTemplateHelpers ( ) : |
||
Résultat |
public getAvailableLocales ( ) : array | ||
Résultat | array |
protected getLoaders ( ) : Symfony\Component\Translation\Loader\LoaderInterface[] | ||
Résultat | Symfony\Component\Translation\Loader\LoaderInterface[] |
public static getReflection ( ) : |
||
Résultat |
public injectPanel ( |
||
$panel |
public injectPsrLogger ( Psr\Log\LoggerInterface $logger = NULL ) | ||
$logger | Psr\Log\LoggerInterface |
public setDefaultLocale ( string $locale ) : |
||
$locale | string | |
Résultat |
public setLocaleWhitelist ( array $whitelist = NULL ) : |
||
$whitelist | array | |
Résultat |
public transChoice ( $message, $number, array $parameters = [], $domain = NULL, $locale = NULL ) | ||
$parameters | array |
public translate ( string $message, integer $count = NULL, array $parameters = [], string $domain = NULL, string $locale = NULL ) : string | ||
$message | string | The message id |
$count | integer | The number to use to find the indice of the message |
$parameters | array | An array of parameters for the message |
$domain | string | The domain for the message |
$locale | string | The locale |
Résultat | string |