wp-transaltions / t15s-registry
Allows loading translation files from T15S
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 1
pkg:composer/wp-transaltions/t15s-registry
Requires
- php: >=7.1
Requires (Dev)
This package is auto-updated.
Last update: 2025-09-29 02:00:19 UTC
README
Allows loading translation files from TranslationsPress.
Installation
If you're using Composer to manage dependencies, you can use the following command to add the plugin to your site:
composer require wp-transaltions/t15s-registry
After that, you can use \WP_Translations\T15S_Registry\add_project( $type, $slug, $api_url ) in your theme or plugin.
Parameters:
$type: eitherpluginortheme.$slug: must match the theme/plugin directory slug.$api_url: TanslationsPress translation API URL.
Note: On a multisite install it's recommended to use it in a must-use plugin.
Usage
Here's an example of how you can use that function:
\WP_Translations\T15S_Registry\add_project( 'plugin', 'example-plugin', 'https://translationspress.com/translate/api/translations/acme/acme-plugin/' ); \WP_Translations\T15S_Registry\add_project( 'theme', 'example-theme', 'https://translationspress.com/translate/api/translations/acme/acme-theme/' );