original_string: protected function indexProductTranslations(array $product)
      {
          if (empty($product['translation'])) {
              return false;
          }
  
          $indexed = 0;
  
          foreach ($product['translation'] as $language => $translation) {
              $translation += $product;
              $snippet = $this->search->getSnippet($translation, $language);
              $indexed += (int) $this->search->setIndex($snippet, 'product', $product['product_id'], $language);
          }
  
          return $indexed > 0;
      }
code: protected function indexProductTranslations(array $product)
      {
          if (empty($product['translation'])) {
              return false;
          }
  
          $indexed = 0;
  
          foreach ($product['translation'] as $language => $translation) {
              $translation += $product;
              $snippet = $this->search->getSnippet($translation, $language);
              $indexed += (int) $this->search->setIndex($snippet, 'product', $product['product_id'], $language);
          }
  
          return $indexed > 0;
      }
code_tokens: protected function indexProductTranslations ( array $ product ) { if ( empty ( $ product [ 'translation' ] ) ) { return false ; } $ indexed = 0 ; foreach ( $ product [ 'translation' ] as $ language => $ translation ) { $ translation += $ product ; $ snippet = $ this -> search -> getSnippet ( $ translation , $ language ) ; $ indexed += ( int ) $ this -> search -> setIndex ( $ snippet , 'product' , $ product [ 'product_id' ] , $ language ) ; } return $ indexed > 0 ; }
docstring: Adds product translations to the search index
  @param array $product
  @return boolean
docstring_tokens: Adds product translations to the search index