FileAccess Orion

TranslatorHelper extends Helper
in package
Uses TranslatorTrait

Tags
author

Fabien Potencier fabien@symfony.com

deprecated

since version 4.3, to be removed in 5.0; use Twig instead.

Table of Contents

$translator  : mixed
$locale  : mixed
__construct()  : mixed
getLocale()  : mixed
{@inheritdoc}
getName()  : mixed
{@inheritdoc}
setLocale()  : mixed
{@inheritdoc}
trans()  : mixed
transChoice()  : mixed
getPluralizationRule()  : int
Returns the plural position to use for the given locale and number.

Properties

Methods

getLocale()

{@inheritdoc}

public getLocale() : mixed
Return values
mixed

getName()

{@inheritdoc}

public getName() : mixed
Return values
mixed

setLocale()

{@inheritdoc}

public setLocale(string $locale) : mixed
Parameters
$locale : string
Return values
mixed

trans()

public trans(mixed $id[, array<string|int, mixed> $parameters = [] ][, mixed $domain = 'messages' ][, mixed $locale = null ]) : mixed
Parameters
$id : mixed
$parameters : array<string|int, mixed> = []
$domain : mixed = 'messages'
$locale : mixed = null
Tags
see
TranslatorInterface::trans()
Return values
mixed

transChoice()

public transChoice(mixed $id, mixed $number[, array<string|int, mixed> $parameters = [] ][, mixed $domain = 'messages' ][, mixed $locale = null ]) : mixed
Parameters
$id : mixed
$number : mixed
$parameters : array<string|int, mixed> = []
$domain : mixed = 'messages'
$locale : mixed = null
Tags
see
TranslatorInterface::transChoice()
deprecated

since Symfony 4.2, use the trans() method instead with a %count% parameter

Return values
mixed

getPluralizationRule()

Returns the plural position to use for the given locale and number.

private getPluralizationRule(int $number, string $locale) : int

The plural rules are derived from code of the Zend Framework (2010-09-25), which is subject to the new BSD license (http://framework.zend.com/license/new-bsd). Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)

Parameters
$number : int
$locale : string
Return values
int

Search results