Download the PHP package wppack/translations-installer without Composer
On this page you can find all versions of the php package wppack/translations-installer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download wppack/translations-installer
More information about wppack/translations-installer
Files in wppack/translations-installer
Package translations-installer
Short Description Composer plugin that downloads WordPress core, plugin and theme translations from wordpress.org as packages are installed or updated.
License GPL-2.0-or-later
Informations about the package translations-installer
WPPack Translations Installer
日本語版 README
Composer plugin that downloads translation files for WordPress core, plugins and themes from wordpress.org, as the packages are installed or updated.
A fork of bjornjohansen/wplang, brought into the WPPack package family.
Supports Composer v2 only. Requires PHP 8.2+ and ext-zip.
Installation
Add the configuration to composer.json (paths are relative to the project
root, i.e. the directory holding composer.json):
Then:
Composer asks to trust the plugin on first install; allow it (or pre-seed
config.allow-plugins):
Usage
Nothing to run: whenever a package of type wordpress-core,
wordpress-plugin or wordpress-theme is installed or updated, the matching
language packs are fetched from the wordpress.org translations API and
unpacked into the configured directory — core at its root, plugins and themes
under plugins/ and themes/, the same layout WordPress itself uses under
wp-content/languages.
The core package is not tied to roots/wordpress: any package that declares
"type": "wordpress-core" (e.g. roots/wordpress, johnpbloch/wordpress-core)
is picked up. Core translations are looked up on wordpress.org by version
only, so the package name does not matter.
Packages that have no translations for the configured locales print a note and are skipped; the install itself never fails because of translations.
Commands
Language packs on wordpress.org are often updated after a package release, so the plugin also ships two commands that can be run at any time:
Downloads translations for every installed WordPress package. Only locales that are missing locally or outdated on wordpress.org are fetched; current ones are skipped. Failures are reported per package and never fail the command.
Read-only report of every package × locale: Up to date, Outdated (local
and remote timestamps shown), Missing or Not available. Exits with code 1
when anything can be updated, so it doubles as a CI freshness check:
How freshness is decided
The wordpress.org API reports an updated timestamp per language pack; the
installed .po file carries the same timestamp in its PO-Revision-Date
header. The plugin compares the two — the same mechanism WordPress core uses
for its own language pack updates. There is no state file: the installed
files are the record, so deleting a .po simply causes that locale to be
re-downloaded. Downloads always unpack the full pack (.po, .mo and
.l10n.php).
The same check runs in the install/update hooks, so unchanged translations are not re-downloaded there either.
Credits
This package was started by Angry Creative, has been rewritten by Bjørn Johansen, integrates compatibility changes made by Mirai and was updated to support Composer v2. The WPPack edition modernizes the codebase for PHP 8.2+.
License
GPL-2.0-or-later
All versions of translations-installer with dependencies
composer-plugin-api Version ^2.0
ext-zip Version *