public function getJavaScriptCode()
    {
        $realTranslations = [];
        $translationsBinding = [];

        foreach ($this->translations as $key => $value) {
            $hash = HashService::get()->getHash($value);
            $realTranslations[$hash] = $value;
            $translationsBinding[$key] = $hash;
        }

        $jsonRealTranslations = $this->handleRealTranslations(ArrayService::get()->arrayToJavaScriptJson($realTranslations));
        $jsonTranslationsBinding = $this->handleTranslationsBinding(ArrayService::get()->arrayToJavaScriptJson($translationsBinding));

        return <<<JS
Fz.Localization.addLocalization($jsonRealTranslations, $jsonTranslationsBinding);
JS;
    }
public function getJavaScriptCode()
    {
        $realTranslations = [];
        $translationsBinding = [];

        foreach ($this->translations as $key => $value) {
            $hash = HashService::get()->getHash($value);
            $realTranslations[$hash] = $value;
            $translationsBinding[$key] = $hash;
        }

        $jsonRealTranslations = $this->handleRealTranslations(ArrayService::get()->arrayToJavaScriptJson($realTranslations));
        $jsonTranslationsBinding = $this->handleTranslationsBinding(ArrayService::get()->arrayToJavaScriptJson($translationsBinding));

        return <<<JS
Fz.Localization.addLocalization($jsonRealTranslations, $jsonTranslationsBinding);
JS;
    }
public function getJavaScriptCode ( ) { $ realTranslations = [ ] ; $ translationsBinding = [ ] ; foreach ( $ this -> translations as $ key => $ value ) { $ hash = HashService :: get ( ) -> getHash ( $ value ) ; $ realTranslations [ $ hash ] = $ value ; $ translationsBinding [ $ key ] = $ hash ; } $ jsonRealTranslations = $ this -> handleRealTranslations ( ArrayService :: get ( ) -> arrayToJavaScriptJson ( $ realTranslations ) ) ; $ jsonTranslationsBinding = $ this -> handleTranslationsBinding ( ArrayService :: get ( ) -> arrayToJavaScriptJson ( $ translationsBinding ) ) ; return  <<<JS
Fz.Localization.addLocalization($jsonRealTranslations, $jsonTranslationsBinding);
JS ; }
Will generate and return the JavaScript code which add all registered
translations to the JavaScript library.

@return string
Will generate and return the JavaScript code which add all registered translations to the JavaScript library .