src/Drivers/Yandex.php
protected function getStoreTranslation($key, $locale) {
        if( ! isset($this->translations[$locale][$key]) )  {
            $response = $this->apiRequest(
                $this->getAttribute('api_url'), [ 'text' => $key, 'lang' => $locale]
            );

            $response = json_decode($response, true);

            $this->translations[$locale][$key] = $response['text'][0];
        }

        return $this->translations[$locale][$key];
    }
protected function getStoreTranslation($key, $locale) {
        if( ! isset($this->translations[$locale][$key]) )  {
            $response = $this->apiRequest(
                $this->getAttribute('api_url'), [ 'text' => $key, 'lang' => $locale]
            );

            $response = json_decode($response, true);

            $this->translations[$locale][$key] = $response['text'][0];
        }

        return $this->translations[$locale][$key];
    }
protected function getStoreTranslation ( $ key , $ locale ) { if ( ! isset ( $ this -> translations [ $ locale ] [ $ key ] ) ) { $ response = $ this -> apiRequest ( $ this -> getAttribute ( 'api_url' ) , [ 'text' => $ key , 'lang' => $ locale ] ) ; $ response = json_decode ( $ response , true ) ; $ this -> translations [ $ locale ] [ $ key ] = $ response [ 'text' ] [ 0 ] ; } return $ this -> translations [ $ locale ] [ $ key ] ; }
Get translation and cache it .

@param $key
@param null $locale
@return mixed
Get translation and cache it .