PHP code example of saxulum / saxulum-translation-provider
1. Go to this page and download the library: Download saxulum/saxulum-translation-provider 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/ */
saxulum / saxulum-translation-provider example snippets
{.php}
use Saxulum\Translation\Cilex\Provider\TranslationProvider;
$app['translator'] = $app->share(function(){
return new Translator;
});
$app->register(new TranslationProvider(), array(
'translation_cache' => '/path/to/cache'
));
{.php}
use Saxulum\Translation\Cilex\Provider\TranslationProvider;
$app['translator'] = $app->share(function(){
return new Translator;
});
$app->register(new TranslationProvider());
{.php}
$app['translation_paths'] = $app->share($app->extend('translation_paths', function ($paths) {
$paths[] = '/path/to/the/translations';
return $paths;
}));