PHP code example of iperamuna / laravel-auto-translations

1. Go to this page and download the library: Download iperamuna/laravel-auto-translations library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

iperamuna / laravel-auto-translations example snippets



return [
    'remote' => [
        'enabled' => env('AUTO_TRANSLATE_REMOTE_VIEW_ENABLED', false),
        'token' => env('AUTO_TRANSLATE_REMOTE_VIEW_TOKEN', ''),
    ],
    'paths' => [
        base_path('resources/js'),
    ],
    
        'ai' => [
            'enabled' => env('AUTO_TRANSLATE_ENABLED', true),
            'api_key' => env('AUTO_TRANSLATE_OPENAI_API_KEY', ''),
            'api_base' => env('AUTO_TRANSLATE_OPENAI_API_BASE', 'https://api.groq.com/openai/v1'),
            'model'   => env('AUTO_TRANSLATE_OPENAI_MODEL', 'gpt-4o-mini'),
            'temp'    => env('AUTO_TRANSLATE_TEMPERATURE', 0.3),
            'chunk'   => env('AUTO_TRANSLATE_CHUNK_SIZE', 50),
        ],
    ];
];
bash
php artisan vendor:publish --tag=auto-translations-config