Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/michalskoula/codeigniter-ai-translation
Translate your CodeIgniter 3/4 language files into any language using the Anthropic Claude REST API.
https://github.com/michalskoula/codeigniter-ai-translation
ai codeigniter php
Last synced: 4 months ago
JSON representation
Translate your CodeIgniter 3/4 language files into any language using the Anthropic Claude REST API.
- Host: GitHub
- URL: https://github.com/michalskoula/codeigniter-ai-translation
- Owner: MichalSkoula
- License: mit
- Created: 2024-09-17T14:41:46.000Z (4 months ago)
- Default Branch: master
- Last Pushed: 2024-10-07T21:20:39.000Z (4 months ago)
- Last Synced: 2024-10-11T07:23:09.335Z (4 months ago)
- Topics: ai, codeigniter, php
- Language: PHP
- Homepage: https://skoula.cz
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# codeigniter-ai-translation
Translate your CodeIgniter 3/4 language files into any language using the Anthropic Claude REST API.
It will automatically add missing translations (array elements), so you can run it periodically to update your language files. Multi-dimensional arrays are also supported.
## Installation
```bash
composer require michalskoula/codeigniter-ai-translation
```Requires PHP 8.1+
## Usage:
```php
translate($file);echo "Translation process completed." . PHP_EOL;
echo "Total files processed: " . $result->getProcessed() . PHP_EOL;
echo "Total items translated: " . $result->getTranslated() . PHP_EOL;
echo "Total items failed: " . $result->getFailed() . PHP_EOL;
if ($result->isError()) {
echo 'Error: ' . $result->getErrorMessage() . PHP_EOL;
}
```## Development
```
./vendor/bin/rector
./vendor/bin/ecs --fix
```## Links
Homepage: https://skoula.cz/blog/2024/10/how-to-translate-codeigniter-3/4-language-files-with-ai/