Skip to content

Commit

Permalink
Laminas\Translator
Browse files Browse the repository at this point in the history
Requires `laminas/laminas-translator` and extends the shipped interface via `Laminas\I18n\Translator\TranslatorInterface`

Signed-off-by: George Steel <george@net-glue.co.uk>
  • Loading branch information
gsteel committed Jul 1, 2024
1 parent a567abb commit f8deca0
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 30 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"ext-intl": "*",
"laminas/laminas-servicemanager": "^3.21.0",
"laminas/laminas-stdlib": "^3.0"
"laminas/laminas-stdlib": "^3.0",
"laminas/laminas-translator": "^1.0"
},
"require-dev": {
"laminas/laminas-cache": "^3.12.1",
Expand Down
55 changes: 54 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 3 additions & 28 deletions src/Translator/TranslatorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,11 @@

namespace Laminas\I18n\Translator;

use Laminas\Translator\TranslatorInterface as Translator;

/**
* Translator interface.
*/
interface TranslatorInterface
interface TranslatorInterface extends Translator
{
/**
* Translate a message.
*
* @param string $message
* @param string $textDomain
* @param string $locale
* @return string
*/
public function translate($message, $textDomain = 'default', $locale = null);

/**
* Translate a plural message.
*
* @param string $singular
* @param string $plural
* @param int $number
* @param string $textDomain
* @param string|null $locale
* @return string
*/
public function translatePlural(
$singular,
$plural,
$number,
$textDomain = 'default',
$locale = null
);
}

0 comments on commit f8deca0

Please sign in to comment.