PHP code example of technicalguru / i18n

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

    

technicalguru / i18n example snippets




/** Put here your language translations */
return array(
	'welcome' => array(
		'de' => 'Willkommen!',
		'en' => 'Welcome!',
	),
);

use TgI18n\I18n;

echo I18N::_('welcome');
echo I18N::_('welcome', 'en');
echo I18N::_('welcome', 'de');

use TgI18n\I18n;

echo I18N::__('welcome');
echo I18N::__('welcome', 'en');
echo I18N::__('welcome', 'de');