summaryrefslogtreecommitdiffstats
path: root/lib/private/l10n
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-04-29 21:22:42 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2015-04-29 21:22:42 +0200
commit5b857a6eabd6ae4616a4f4757ce426e2ea15d313 (patch)
tree69d93ec686c086ef57bef51bd411132863101e91 /lib/private/l10n
parent002d74f95ab8d06e969fdd2c3ceeca4e766f3251 (diff)
downloadnextcloud-server-5b857a6eabd6ae4616a4f4757ce426e2ea15d313.tar.gz
nextcloud-server-5b857a6eabd6ae4616a4f4757ce426e2ea15d313.zip
implement json serialize for l10n string
Diffstat (limited to 'lib/private/l10n')
-rw-r--r--lib/private/l10n/string.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/l10n/string.php b/lib/private/l10n/string.php
index 6167a6737dc..dd861636f3b 100644
--- a/lib/private/l10n/string.php
+++ b/lib/private/l10n/string.php
@@ -24,7 +24,9 @@
*
*/
-class OC_L10N_String{
+use JsonSerializable;
+
+class OC_L10N_String implements JsonSerializable {
/**
* @var OC_L10N
*/
@@ -74,4 +76,10 @@ class OC_L10N_String{
$text = str_replace('%n', $this->count, $text);
return vsprintf($text, $this->parameters);
}
+
+
+ public function jsonSerialize() {
+ return $this->__toString();
+ }
+
}