PHP code example of moderntribe / weglot-companion

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

    

moderntribe / weglot-companion example snippets


$translated = apply_filters( \Tribe\Weglot\Translate\Translate_Subscriber::FILTER, '<p>Some kind of HTML content</p>' );

$translated = apply_filters( \Tribe\Weglot\Translate\Translate_Subscriber::FILTER, [
    '<li>some content</li>',
    '<li>some more content</li>'
    // etc...
] );