PHP code example of robotdance / php-i18n

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

    

robotdance / php-i18n example snippets


$translated = I18n::t('example_message');

$translated = I18n::t('example_message', [], 'pt_BR');

$translated = I18n::t('hello_message', ['user' => 'Bob']); // 'Hello Bob'

$value = I18n::l(true);    // 'verdadeiro'
$value = I18n::l(123.45); // '123,45'