aboutsummaryrefslogtreecommitdiffstats
path: root/include/language.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-12 19:00:54 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-12 19:00:54 -0700
commit018e7022817fd73e904021ecf46f2c5839da9a62 (patch)
tree0bc817910756931bcaa0b773d30d31ee3c8fa6ed /include/language.php
parent5386686a1e0e60623d6421cbd85a93814c74fb58 (diff)
parent1e0e812440b8b87c39a88692e39eb0baca736b6e (diff)
downloadvolse-hubzilla-018e7022817fd73e904021ecf46f2c5839da9a62.tar.gz
volse-hubzilla-018e7022817fd73e904021ecf46f2c5839da9a62.tar.bz2
volse-hubzilla-018e7022817fd73e904021ecf46f2c5839da9a62.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: mod/mitem.php view/nl/strings.php
Diffstat (limited to 'include/language.php')
-rw-r--r--include/language.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/language.php b/include/language.php
index 1e8528dc1..0af72142f 100644
--- a/include/language.php
+++ b/include/language.php
@@ -159,13 +159,26 @@ function t($s, $ctx = '') {
if (x($a->strings, $cs)) {
$t = $a->strings[$cs];
- return is_array($t) ? $t[0] : $t;
+ return ((is_array($t)) ? translate_product($t[0]) : translate_product($t));
}
- return $s;
+ return translate_product($s);
}
/**
+ * @brief translate product name
+ * Merging strings from different project names is problematic so we'll do that with a string replacement
+ */
+
+function translate_product($s) {
+
+ return str_replace(array('$product','$Product'),array(RED_PLATFORM,ucfirst(RED_PLATFORM)),$s);
+
+}
+
+
+
+/**
* @brief
*
* @param string $singular