This bundle provides a Weblate integration for Symfony Translation.
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
bin/console translation:push [options] weblate
bin/console translation:pull [options] weblate
This package has been developed for php 7.4 with compatibility tested for php 7.2 to 8.2RC2.
composer test
For compatibility tests with Symfony 5.3 to 6.0 including a local weblate instance please use the symfony-weblate-tests package.
Please see CHANGELOG for more information about recent changes.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.