Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/l10n.php')
-rw-r--r--lib/l10n.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/l10n.php b/lib/l10n.php
index 54331d44ae4..a5544eb3a27 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -110,6 +110,22 @@ class OC_L10N{
}
/**
+ * @brief Translating
+ * @param $textArray The text array we need a translation for
+ * @returns Translation or the same text
+ *
+ * Returns the translation. If no translation is found, $textArray will be
+ * returned.
+ */
+ public function tA($textArray){
+ $result = array();
+ foreach($textArray as $key => $text){
+ $result[$key] = $this->t($text);
+ }
+ return $result;
+ }
+
+ /**
* @brief getTranslations
* @returns Fetch all translations
*