diff options
author | Max Kostikov <max@kostikov.co> | 2018-10-13 19:50:09 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2018-10-13 19:50:09 +0200 |
commit | 729d0d536875b503fdc468cc0c9e89f2aa6b577c (patch) | |
tree | 587ab1f6279e6b882cbc4d10d3905204a235b6ad /include | |
parent | 5c0d31873afef00ce7f6a4e1160f50f659f6b8c0 (diff) | |
download | volse-hubzilla-729d0d536875b503fdc468cc0c9e89f2aa6b577c.tar.gz volse-hubzilla-729d0d536875b503fdc468cc0c9e89f2aa6b577c.tar.bz2 volse-hubzilla-729d0d536875b503fdc468cc0c9e89f2aa6b577c.zip |
Update language.php
Diffstat (limited to 'include')
-rw-r--r-- | include/language.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/include/language.php b/include/language.php index 69a7e3004..18b942bce 100644 --- a/include/language.php +++ b/include/language.php @@ -255,6 +255,32 @@ function tt($singular, $plural, $count, $ctx = ''){ } /** + * @brief Return slash separated string of plurals translation forms + * + * @param string $k key in translations array + * @return string + */ +function ta($k){ + + $t = App::$strings[$k]; + if (is_array($t)) + $t = implode("/", $t); + return ($t == "" ? $k : $t); +} + +/** + * @brief Return string_plural_select_xx function code + * + * @return string + */ + +function tf() { + + $s = "plural_function_code"; + return (x(App::$strings, $s) ? App::$strings[$s] : "return 0;"); +} + +/** * @brief Provide a fallback which will not collide with a function defined in * any language file. * |