Download the PHP package yardinternet/yard-deepl without Composer

On this page you can find all versions of the php package yardinternet/yard-deepl. 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 yard-deepl

Yard DeepL

Author: Yard Digital Agency Author URI: https://www.yard.nl Contributors: yarddigitalagency, mvdhoek1 License: EUPL v1.2 License URI: https://www.gnu.org/licenses/gpl-2.0.html Requires at least: 6.0 Requires PHP: 8.0 Stable tag: 2.0.0 Tags: deepl, translating, secure Tested up to: 7.0

This plugin registers secure API endpoints that allow you to request translations directly from DeepL without exposing your DeepL API-key.

Description

This plugin registers secure API endpoints that allow you to request translations directly from DeepL without exposing your DeepL API-key. These endpoints are only accessible when a valid nonce is provided. When providing translations to website visitors, you can configure which languages are supported for translation.

Caching Mechanism

Each object that is translated will store its cached translation in the wp_postmeta table within the database. This caching mechanism ensures that translations are efficiently reused, reducing unnecessary API requests to DeepL and saving costs.

This approach minimizes the number of API calls to DeepL, ensuring translations are kept up to date only when necessary.

Admin: Cache Metabox

A metabox labeled Yard DeepL is displayed on the edit screen of supported post types (default: page). It provides two options:

Admin: Translation Cache Column

A Translation cache column is added to the post list screen of all supported post types. Its purpose is to notify editors which posts should be cached as soon as possible to avoid unnecessary DeepL API costs.

The uncached call count is only incremented for visitor requests (users without cache-write capability) and is automatically reset per language once a cache entry is stored. Posts with the Disable translation cache option enabled are excluded from the column entirely.

External Services

This plugin connects to the DeepL API to provide translations for content.

Installation

  1. Upload plugin directory to the /wp-content/plugins/ directory
  2. Activate the plugin through the 'Plugins' menu in WordPress

Development

The packages inside the vendor directory are namespace-prefixed. This is done by creating a new vendor-prefixed directory. After running composer install, this process happens automatically: the vendor-prefixed directory is generated on the fly, and the original vendor directory is deleted after installation.

If you need to work with development dependencies, follow these steps:

  1. Run composer install. This will remove the vendor directory and create the vendor-prefixed directory.
  2. Run composer install --no-scripts. The --no-scripts flag prevents the automatic deletion of the vendor directory, allowing you to work with the development dependencies. Ensure that the vendor-prefixed directory is still present, as the plug-in relies on it.

Ready for releasing a new version?

  1. Run composer install --optimize-autoloader. This will optimize the autoloading rules by converting them into a class map, which improves performance and speeds up autoloading. It is particularly useful for production environments.

Usage

Security

The API endpoints registered by this plugin are secured using a WordPress nonce. The nonce is passed to the front-end using the wp_localize_script function and is stored in a global JavaScript object ydpl which contains the following properties:

When making requests to the API, ensure that the nonce is included in the request headers. The header should be named X-WP-Nonce, and it should contain a nonce created with the wp_rest action (available via ydpl.ydpl_api_request_nonce on the front-end).

Rate Limiting

To prevent abuse, unauthenticated requests (or requests from users without the cache capability) are limited to 3 requests per 60 seconds per IP address. Authenticated users with the required cache capability (default: edit_posts) are exempt from this rate limit.

Cache Capability

Only users with the edit_posts capability can trigger cache creation. This can be customized using the yard::deepl/cache_capability filter (see Filters).

Example

Request
Response

Filters

Filter Default Description
yard::deepl/cache_capability 'edit_posts' The WordPress capability required to create cache entries. Users without this capability receive translations but results are not cached.
yard::deepl/cache_metabox_post_types ['page'] Post types on which the Yard DeepL cache metabox is displayed.
yard::deepl/disable_cache_metabox_post_types Deprecated. Use yard::deepl/cache_metabox_post_types instead.

Changelog

2.0.0 (June 04, 2026)

1.1.0 (Jan 31, 2025)

1.0.2 (Jan 08, 2025)

1.0.1 (Jan 07, 2025)

1.0.0 (Oct 18, 2024)

About us

banner


All versions of yard-deepl with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
php-di/php-di Version ^7.0
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 yardinternet/yard-deepl contains the following files

Loading the files please wait ...