diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-10-19 11:18:28 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-10-19 11:18:28 +0200 |
commit | fa9e9510e5d993d183feb942fe74be5fdd07f5cf (patch) | |
tree | 41fec09f527a9346e043b8099b458a97d81b03ed /include/language.php | |
parent | 32de123db0ac526795a237ff46885fe8a332cbc0 (diff) | |
parent | 06b3ad1071c755757555baf941e2c0f446f97b21 (diff) | |
download | volse-hubzilla-3.8.tar.gz volse-hubzilla-3.8.tar.bz2 volse-hubzilla-3.8.zip |
Merge branch '3.8RC'3.8
Diffstat (limited to 'include/language.php')
-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..e9d62e434 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] : "0"); +} + +/** * @brief Provide a fallback which will not collide with a function defined in * any language file. * |