PHP code example of studionoir / translingua

1. Go to this page and download the library: Download studionoir/translingua 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/ */

    

studionoir / translingua example snippets




return [
    'provider' => 'deepl',
    'apiKey' => '$TRANSLINGUA_KEY',
    'promptContext' => 'Address the reader informally. Leave product names in English.',
    'batchSize' => 25,
    'createRevisions' => true,
];
bash
php craft plugin/install translingua
bash
php craft translingua/license/set-edition plus
php craft translingua/license/set-edition standard
php craft translingua/license/edition          # prints the active one

translations/{locale}/{category}.php
bash
php craft translingua/translate/sources
bash
php craft translingua/translate/scan
bash
php craft translingua/translate/elements --from=siteHandle --to=otherSite --groups="Blog,News"