PHP code example of rebelox / languages
1. Go to this page and download the library: Download rebelox/languages 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/ */
rebelox / languages example snippets
anguage\Language;
$language = new Language(array(
'languages_path' => __DIR__ . "/config/languages.json",
'messages_path' => __DIR__ . "/config/messages.json"
));
echo $language->get('hello'); //note that the "hello" is the name of the message, a.k.a the identifier.