public function includeLanguageJavaScriptFiles()
    {
        $filePath = $this->assetHandlerConnectorManager->getFormzGeneratedFilePath('locale-' . ContextService::get()->getLanguageKey()) . '.js';

        $this->assetHandlerConnectorManager->createFileInTemporaryDirectory(
            $filePath,
            function () {
                return $this->getFormzLocalizationJavaScriptAssetHandler()
                    ->injectTranslationsForFormFieldsValidation()
                    ->getJavaScriptCode();
            }
        );

        $this->includeJsFile(StringService::get()->getResourceRelativePath($filePath));

        return $this;
    }
public function includeLanguageJavaScriptFiles()
    {
        $filePath = $this->assetHandlerConnectorManager->getFormzGeneratedFilePath('locale-' . ContextService::get()->getLanguageKey()) . '.js';

        $this->assetHandlerConnectorManager->createFileInTemporaryDirectory(
            $filePath,
            function () {
                return $this->getFormzLocalizationJavaScriptAssetHandler()
                    ->injectTranslationsForFormFieldsValidation()
                    ->getJavaScriptCode();
            }
        );

        $this->includeJsFile(StringService::get()->getResourceRelativePath($filePath));

        return $this;
    }
public function includeLanguageJavaScriptFiles ( ) { $ filePath = $ this -> assetHandlerConnectorManager -> getFormzGeneratedFilePath ( 'locale-' . ContextService :: get ( ) -> getLanguageKey ( ) ) . '.js' ; $ this -> assetHandlerConnectorManager -> createFileInTemporaryDirectory ( $ filePath , function ( ) { return $ this -> getFormzLocalizationJavaScriptAssetHandler ( ) -> injectTranslationsForFormFieldsValidation ( ) -> getJavaScriptCode ( ) ; } ) ; $ this -> includeJsFile ( StringService :: get ( ) -> getResourceRelativePath ( $ filePath ) ) ; return $ this ; }
This function will handle the JavaScript language files.

A file will be created for the current language (there can be as many
files as languages), containing the translations handling for JavaScript.
If the file already exists, it is directly included.

@return $this
This function will handle the JavaScript language files .