summaryrefslogtreecommitdiffstats
path: root/lib/l10n.php
diff options
context:
space:
mode:
authorMichael Gapczynski <GapczynskiM@gmail.com>2011-08-10 13:40:47 -0400
committerMichael Gapczynski <GapczynskiM@gmail.com>2011-08-10 13:40:47 -0400
commite1bde1a78eac82f981358e68af031d974ca81639 (patch)
treec9ccba7ab7aab6a5461a720d875c818bafad2b4a /lib/l10n.php
parent80660bdc071632f699ea2051d56f03cc887948e6 (diff)
parentfbf86c6683da91c8cadad128e5ac7c0742aaffed (diff)
downloadnextcloud-server-e1bde1a78eac82f981358e68af031d974ca81639.tar.gz
nextcloud-server-e1bde1a78eac82f981358e68af031d974ca81639.zip
Merge branch 'master' into sharing
Conflicts: files/templates/index.php
Diffstat (limited to 'lib/l10n.php')
-rw-r--r--lib/l10n.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/l10n.php b/lib/l10n.php
index 5271bd4e589..2d565ad0799 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -97,16 +97,17 @@ class OC_L10N{
/**
* @brief Translating
* @param $text The text we need a translation for
+ * @param $parameters default:array() Parameters for sprintf
* @returns Translation or the same text
*
* Returns the translation. If no translation is found, $text will be
* returned.
*/
- public function t($text){
+ public function t($text, $parameters = array()){
if(array_key_exists($text, $this->translations)){
- return $this->translations[$text];
+ return vsprintf( $this->translations[$text], $parameters );
}
- return $text;
+ return vsprintf( $text, $parameters );
}
/**