1. Go to this page and download the library: Download modera/translations-bundle 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/ */
modera / translations-bundle example snippets
php
// config/bundles.php
return [
// ...
Modera\LanguagesBundle\ModeraLanguagesBundle::class => ['all' => true], // if you still don't have it
Modera\TranslationsBundle\ModeraTranslationsBundle::class => ['all' => true],
];
php
use Modera\TranslationsBundle\Helper\T;
T::trans('Hello');
T::trans('Hello, %name%', array('%name%' => $name'), 'greetings');
$domain = 'examples';
$longMessage = 'This way of defining long translation ';
$longMessage.= 'messages can be used.';
$longMessage.= 'For more details please see docblock for T class.';
T::trans($longMessage, array(), $domain);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.