From 71f5908e216c71e7ab379bc15902ddf59b2884ba Mon Sep 17 00:00:00 2001 From: friendica Date: Tue, 20 May 2014 20:22:38 -0700 Subject: add optional context to translations --- include/language.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/language.php b/include/language.php index b43f5aacc..f4c7d1524 100644 --- a/include/language.php +++ b/include/language.php @@ -145,10 +145,12 @@ function load_translation_table($lang, $install = false) { /** * @brief translate string if translation exists. * - * @param s string that should get translated + * @param $s string that should get translated + * @param $ctx optional context to appear in po file * @return translated string if exsists, otherwise s + * */ -function t($s) { +function t($s,$ctx = '') { global $a; if(x($a->strings,$s)) { -- cgit v1.2.3