code: protected function translateArrayValues(array $array) {
          foreach ($array as &$value) {
              if (is_string($value)) {
                  $value = $this->translate($value);
              } else if (is_array($value)) {
                  $value = $this->translateArrayValues($value);
              }
          }
          return $array;
      }
docs: Translate values of the $array recursively
  @param array $array
  @return array