From cbe8745f3ad601f932268fff1cc17b6febb76c60 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Mon, 12 Oct 2015 12:40:58 +0000 Subject: [PATCH] Do NOT localize finalclass values in REST/JSON. SVN:2.2.0[3806] --- core/attributedef.class.inc.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index ef62d87b00..e9d06fe9f9 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -1938,7 +1938,16 @@ class AttributeFinalClass extends AttributeString if (empty($sValue)) return ''; return MetaModel::GetName($sValue); } - + /** + * Helper to get a value that will be JSON encoded + * The operation is the opposite to FromJSONToValue + */ + public function GetForJSON($value) + { + // JSON values are NOT localized + return $value; + } + public function GetAsCSV($value, $sSeparator = ',', $sTextQualifier = '"', $oHostObject = null, $bLocalize = true) { if ($bLocalize && $value != '')