implement json serialize for l10n string
This commit is contained in:
parent
002d74f95a
commit
5b857a6eab
1 changed files with 9 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue