public static function modelTranslator($json, $lang) { if (TextHelper::isJson($json)) { $array = json_decode($json, true); return $array[$lang]; } else { return $json; } }