PHP code example of beapi / simple-punctual-translation

1. Go to this page and download the library: Download beapi/simple-punctual-translation 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/ */

    

beapi / simple-punctual-translation example snippets


the_title(); // Title in English

switch_to_language();
the_title(); // Title in French
restore_original_language();

the_title(); // Title in English