From 4ce65d59ca91871cfd126497158200a818720bce Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 13:30:08 +0200 Subject: Adding upstream version 0.13.1. Signed-off-by: Daniel Baumann --- vendor/ipl/i18n/src/functions.php | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 vendor/ipl/i18n/src/functions.php (limited to 'vendor/ipl/i18n/src/functions.php') diff --git a/vendor/ipl/i18n/src/functions.php b/vendor/ipl/i18n/src/functions.php new file mode 100644 index 0000000..74d58df --- /dev/null +++ b/vendor/ipl/i18n/src/functions.php @@ -0,0 +1,34 @@ +translate($message, $context); +} + +/** + * Translate a plural message + * + * The returned message is based on the given number to decide between the singular and plural forms. + * That is also the case if no translation is found. + * + * @param string $singular Singular message + * @param string $plural Plural message + * @param int $number Number to decide between the returned singular and plural forms + * @param string $context Message context + * + * @return string Translated message or original message if no translation is found + */ +function tp($singular, $plural, $number, $context = null) +{ + return StaticTranslator::$instance->translatePlural($singular, $plural, $number, $context); +} -- cgit v1.2.3