summaryrefslogtreecommitdiff
path: root/src/helpers.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers.php')
-rw-r--r--src/helpers.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/helpers.php b/src/helpers.php
index 84f26dfa..64ca9ec8 100644
--- a/src/helpers.php
+++ b/src/helpers.php
@@ -154,6 +154,23 @@ function __($key, $replace = [])
}
/**
+ * Translate the given message
+ *
+ * @param string $key
+ * @param string $keyPlural
+ * @param int $number
+ * @param array $replace
+ * @return string
+ */
+function _e($key, $keyPlural, $number, $replace = [])
+{
+ /** @var Translator $translator */
+ $translator = app('translator');
+
+ return $translator->translatePlural($key, $keyPlural, $number, $replace);
+}
+
+/**
* @param string $path
* @param array $parameters
* @return UrlGeneratorInterface|string