Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/panlatent/translator
Poedit extractor for Craft CMS
https://github.com/panlatent/translator
craftcms gettext i18n poedit translation yii2
Last synced: about 1 month ago
JSON representation
Poedit extractor for Craft CMS
- Host: GitHub
- URL: https://github.com/panlatent/translator
- Owner: panlatent
- License: mit
- Created: 2024-05-09T06:31:49.000Z (6 months ago)
- Default Branch: cli
- Last Pushed: 2024-08-18T06:07:37.000Z (3 months ago)
- Last Synced: 2024-09-30T22:18:31.917Z (about 2 months ago)
- Topics: craftcms, gettext, i18n, poedit, translation, yii2
- Language: PHP
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Translator
===========Translator is command tools that can extract message strings from PHP source code and Twig templates.
It is designed to work with tools like Poedit and supports CraftCMS.Requirements
------------
+ PHP 8.2 or laterInstallation
------------```bash
composer global require panlatent/translator:cli
```Usages
------Add custom extractor on Poedit.
```bash
./translator extract %F --output=%o
```Add config to `config/app.php`:
```php
'components' => [
'i18n' => [
'translations' => [
'site' => [
'class' => GettextMessageSource::class,
'sourceLanguage' => 'en-US',
'basePath' => '@translations',
],
'*' => [
'class' => GettextMessageSource::class,
'sourceLanguage' => 'en-US',
'basePath' => '@translations',
],
]
],
],
```License
-------
The Translator is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).