Download the PHP package werkraum/deepl-translate-slim without Composer

On this page you can find all versions of the php package werkraum/deepl-translate-slim. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package deepl-translate-slim

What does it do?

Translate all your pages on demand, without additional configuration. You do not need to set up more than one language in TYPO3. Enable Translation targets in your site configuration and display a language menu with our Menu Integration and you are ready to go.

Further Infos

Demo Link (german)

first News (german)

https://werkraum.net/typo3-deepl-integration (german)

Installation

composer require werkraum/deepl-translate-slim

Extension Setup

You have to provide an authenticationKey. Make sure to set the API Type to pro if you have a pro account.

Global Configuration Values

Key Description
authenticationKey The authentication Key for the DeepL Api Deepl API Key
host The API Type. Free and Pro have different Endpoints. Free and Pro
formality See Deepl API Reference
ignoreTags See Deepl API Reference
splitSentences See Deepl API Reference
preserveFormatting See Deepl API Reference
nonSplittingTags See Deepl API Reference
outlineDetection See Deepl API Reference
splittingTags See Deepl API Reference
clearCache See Caching

Site Configuration Values

Name Key Description
(default/fallback) Source Language default_deepl_source_language The source language DeepL will use to translate from. Can be disabled for each language. See languages.
(default/fallback) Allowed targets default_deepl_allowed_languages Add all allowed languages as alternate links. (clear the page cache to make this change take effect!)
Hreflang deepl_hreflang Only this languages will be offered for translation. Can be changed for each language. See languages.
Exclude Elements deepl_exclude_elements_by_selector Exclude HTML elements from translation by CSS3 Selector (comma-separated!)
Split content deepl_split_content_by_selectors DeepL has a content-length limit per translation request so we need to split our html into parts. Specify parts of your HTML by a comma-separated list of CSS3 selectors which can be translated separately. e.g. "#page-header,#page-content,#page-footer"
Replace links deepl_replace_links Add the language param "deepl" to all links?
Skip links deepl_replace_links_attribute Yes/No
Translated by machine placeholder deepl_translated_by_machine You have the following placeholder: {source}, {target}, {originalLink}
Target for the Translated by machine placeholder deepl_translated_by_machine_target Please specify an html element with an ID
Translate the Translated by machine placeholder deepl_translate_translated_by_machine Yes/No
Recaptcha Protection deepl_recaptcha Enable recaptcha verification to allow access to translated content.
Recaptcha Verify Page deepl_recaptcha_redirect_to_page PAge to redirect the user to verify their access via recaptcha. The configured page has to display the recaptcha verify plugin.

Menu Integration

The extension has a custom \Werkraum\DeeplTranslate\DataProcessing\DeepLMenuProcessor to provide the enabled DeepL translation targets. It provides the same values as the \TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor

Caching

The extension has its own cache to ensure that translations are retained in the system even if the content of the pages changes. The service is not free of charge and should be used sparingly. Nevertheless, this cache can be checked and emptied:

You can enable cacheClear in the extension configuration to always flush the translations on page or page content change. By default it is disabled.

A dedicated view in the InfoModule provides a detailed overview of all cached pages.

Custom Translation Processing

You can customize and extend the translation process by implementing a custom DocumentProcessor with the Interface \Werkraum\DeeplTranslate\DocumentProcessor\DocumentProcessorInterface.

Look into ReplaceLinksProcessor.php to see it in action.

SEO and Bots

To save DeepL resources and avoid spamming the translation service, we use the following rules:

You should exclude all Urls with deepl from your robots.txt file. For example:


All versions of deepl-translate-slim with dependencies

PHP Build Version
Package Version
Requires typo3/cms-core Version ^12 || ^13
php Version ^8.1
ext-curl Version *
ext-dom Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package werkraum/deepl-translate-slim contains the following files

Loading the files please wait ....