PHP code example of puresoft / easy-lang

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

    

puresoft / easy-lang example snippets


$languages_path = 'languages/'; // Don't forget '/' at the end of path

$language_short_name = 'en';

$is_rtl = false; // Some languages are in right to left direction. This will be useful if we store this property in EasyLang for later use_

$translate = new EasyLang( $languages_path, $language_short_name, $is_rtl_ );