protected function getTranslationForId($id, $translationArray, $number = 0) {
        $translation = '';
        if(isset($translationArray[$id])) { //Id all join
            $translation = $this->getBasicTranslationForId($translationArray[$id], $number);
        } else { //Id separataly
            $arrayOfIds = explode(' ', $id);
            $constructTranslateArray = $translationArray;
            foreach ($arrayOfIds as $subId) {
                if(!isset($constructTranslateArray[$subId])) {
                    throw new TranslateException('Translation id not exists.('.$id.')');
                }
                $constructTranslateArray = $constructTranslateArray[$subId];

            }
            $translation = $this->getBasicTranslationForId($constructTranslateArray, $number);
        }
        //Return the string translate with the parameters include into the placeholders
        return $translation;
    }
protected function getTranslationForId($id, $translationArray, $number = 0) {
        $translation = '';
        if(isset($translationArray[$id])) { //Id all join
            $translation = $this->getBasicTranslationForId($translationArray[$id], $number);
        } else { //Id separataly
            $arrayOfIds = explode(' ', $id);
            $constructTranslateArray = $translationArray;
            foreach ($arrayOfIds as $subId) {
                if(!isset($constructTranslateArray[$subId])) {
                    throw new TranslateException('Translation id not exists.('.$id.')');
                }
                $constructTranslateArray = $constructTranslateArray[$subId];

            }
            $translation = $this->getBasicTranslationForId($constructTranslateArray, $number);
        }
        //Return the string translate with the parameters include into the placeholders
        return $translation;
    }
protected function getTranslationForId ( $ id , $ translationArray , $ number = 0 ) { $ translation = '' ; if ( isset ( $ translationArray [ $ id ] ) ) { //Id all join $ translation = $ this -> getBasicTranslationForId ( $ translationArray [ $ id ] , $ number ) ; } else { //Id separataly $ arrayOfIds = explode ( ' ' , $ id ) ; $ constructTranslateArray = $ translationArray ; foreach ( $ arrayOfIds as $ subId ) { if ( ! isset ( $ constructTranslateArray [ $ subId ] ) ) { throw new TranslateException ( 'Translation id not exists.(' . $ id . ')' ) ; } $ constructTranslateArray = $ constructTranslateArray [ $ subId ] ; } $ translation = $ this -> getBasicTranslationForId ( $ constructTranslateArray , $ number ) ; } //Return the string translate with the parameters include into the placeholders return $ translation ; }
Get the translation.

@param string  $id
@param array   $translationArray
@param int     $number

@throws TranslateException

@return string translation
Get the translation .