sourcebroker / t3apitranslatr
Bridge between ext:t3api and ext:translatr which allows to get language labels as JSON.
Package info
github.com/sourcebroker/t3apitranslatr
Language:Shell
Type:typo3-cms-extension
pkg:composer/sourcebroker/t3apitranslatr
Requires
- php: ^8.2
- sourcebroker/t3api: ^4.0 || ^5.0
- sourcebroker/translatr: ^7.0
- typo3/cms-core: ^13.4 || ^14.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.95
- phpstan/phpstan: ^2.1
- saschaegerer/phpstan-typo3: ^2.2 || ^3.1
- ssch/typo3-rector: ^3.16
- typo3/coding-standards: ^0.9.0
Suggests
None
Provides
None
Conflicts
None
Replaces
- typo3-ter/t3apitranslatr: 4.0.0
README
What does it do?
This extension allows to get language labels from ext:translatr as JSON.
Installation
Use composer:
composer require sourcebroker/t3apitranslatr
After installing the labels are accessible by following endpoint:
/_api/translations
To narrow the number of labels fetch you can use tags on ext:translator and get only those tags that are needed on page.
/_api/translations?tags[]=general&tags[]=user
Development
The ddev environment installs TYPO3 13 and 14 with the extension, a site with en / pl / de languages and the test
labels of .ddev/test-content/test_labels (tags general and user).
ddev start ddev install-all # or ddev install-v13 / ddev install-v14 ddev test-api 14 # calls /_api/translations in all languages with and without tags ddev ci # php-cs-fixer, rector, phpstan ddev fix # applies the fixes of rector and php-cs-fixer
URLs: https://t3apitranslatr.ddev.site/, https://v13.t3apitranslatr.ddev.site/typo3/, https://v14.t3apitranslatr.ddev.site/typo3/ (admin / Joh316!!)
Changelog
See https://github.com/sourcebroker/t3apitranslatr/blob/master/CHANGELOG.rst