PHP code example of sagittariusx / beluga.translation
1. Go to this page and download the library: Download sagittariusx/beluga.translation 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/ */
sagittariusx / beluga.translation example snippets
use \Beluga\Tranlation\Locale;
Locale::Create(
// The fallback locale if no other was found
new Locale( 'de', 'AT', 'UTF-8' ),
// Check also the URL path for an locale or language part?
true,
// This are the names of the parameters, accepted from $_POST, $_GET and $_SESSION
[ 'locale', 'language', 'lang' ]
)
->registerAsGlobalInstance();