diff --git a/docs/book/view-helpers.md b/docs/book/view-helpers.md index f4342fe6..48d93612 100644 --- a/docs/book/view-helpers.md +++ b/docs/book/view-helpers.md @@ -426,7 +426,7 @@ The `xgettext` utility can be used to compile `*.po` files from PHP source files translate view helper. ```bash -$ xgettext --language=php --add-location --keyword=translate my-view-file.phtml +$ xgettext --language=php --add-location --keyword=translate --keyword=translatePlural:1,2 my-view-file.phtml ``` See the [Gettext Wikipedia page](http://en.wikipedia.org/wiki/Gettext) for more information. @@ -489,6 +489,17 @@ where: `en_US`). If unset, it will use the default locale (return value of `Locale::getDefault()`). +### Gettext + +The `xgettext` utility can be used to compile `*.po` files from PHP source files containing the +translate view helper. + +```bash +$ xgettext --language=php --add-location --keyword=translate --keyword=translatePlural:1,2 my-view-file.phtml +``` + +See the [Gettext Wikipedia page](http://en.wikipedia.org/wiki/Gettext) for more information. + ### Public Methods Public methods for setting a `Zend\I18n\Translator\Translator` and a default diff --git a/src/Translator/TranslatorServiceFactory.php b/src/Translator/TranslatorServiceFactory.php index 552d18f4..45d5d971 100644 --- a/src/Translator/TranslatorServiceFactory.php +++ b/src/Translator/TranslatorServiceFactory.php @@ -41,7 +41,7 @@ public function __invoke(ContainerInterface $container, $requestedName, array $o * Proxies to `__invoke()`. * * @param ServiceLocatorInterface $serviceLocator - * @returns Translator + * @return Translator */ public function createService(ServiceLocatorInterface $serviceLocator) {