Weblate Translation Provider
This bundle provides a Weblate integration for Symfony Translation.
Installation
composer require m2mtech/weblate-translation-provider
If you are not using Flex enable the bundle:
// config/bundles.php
return [
// ...
M2MTech\WeblateTranslationProvider\WeblateTranslationProviderBundle::class => ['all' => true],
];
Enable the translation provider:
# config/packages/translation.yaml
framework:
translator:
providers:
weblate:
dsn: '%env(WEBLATE_DSN)%'
locales: ['en', 'de']
and set the DSN in your .env file:
# .env
WEBLATE_DSN=weblate://PROJECT_NAME:API_TOKEN@WEBLATE_URL
If you are using a local weblate instance, you can disable the usage of https and/or the verification of the used certificate:
# config/packages/weblate.yaml
weblate_translation_provider:
https: false
verify_peer: false
Usage
bin/console translation:push [options] weblate
bin/console translation:pull [options] weblate
Testing
This package has been developed for php 7.4 with compatibility tested for php 7.2 to 8.1.
composer test
For compatibility tests with Symfony 5.3 to 6.0 including a local weblate instance please use the symfony-weblate-tests package.
Changelog
Please see CHANGELOG for more information about recent changes.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.