Skip to content

Commit

Permalink
added transChoice function
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Assing committed Feb 9, 2012
1 parent c5ebdca commit 56a7a5b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Admin/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -1888,6 +1888,27 @@ public function trans($id, array $parameters = array(), $domain = null, $locale
return $this->translator->trans($id, $parameters, $domain, $locale);
}

/**
* translate a message id
*
* @param string $id
* @param array $parameters
* @param null $domain
* @param null $locale
* @return string the translated string
*/
public function transChoice($id, $count, array $parameters = array(), $domain = null, $locale = null)
{
$domain = $domain ?: $this->translationDomain;

if (!$this->translator) {
return $id;
}

return $this->translator->transChoice($id, $count, $parameters, $domain, $locale);
}


/**
* set the translation domain
*
Expand Down

0 comments on commit 56a7a5b

Please sign in to comment.