function changeLocale($locale) { $pairs = \App\Myclasses\Arrays::translate($locale); $array = []; foreach ($this->result as $key => $value) { $newKey = $pairs[$key]; $array[$newKey] = $value; } $this->result = $array; }
function changeLocale($locale) { $pairs = Arrays::translate($locale); $this->name = $this->thirdChartName($locale, $this->nameStyle); $array = []; foreach ($this->result as $key => $value) { $newKey = $pairs[$key]; $array[$newKey] = $value; } $this->result = $array; $array2 = []; foreach ($this->total as $key => $value) { $newKey = $pairs[$key]; $array2[$newKey] = $value; } $this->total = $array2; $this->planetTypeArray = Arrays::planetTypeArray(); }