1. Go to this page and download the library: Download mberatsanli/multilangphp 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/ */
mberatsanli / multilangphp example snippets
multilang::setup();
multilang::set("dir", "../demo/langs/");
multilang::get($req, $return);
echo multilang::listlang($returnType);
// '../demo/langs/az.php'
$LANG = array(); // We are creating an array called LANG
$LANG['test'] = "Bu bir testdir.";
$LANG['CALLED_NAME'] = "CONTENTS";
echo multilang::lang($type);
// Example
echo multilang::lang('test'); // Output (return): Bu bir testtir.
// index.php
et("dir", "langs/"); // We defined the language directory
multilang::setup(); // We starting the library
echo multilang::lang("test"); // Echo the text
print_r(multilang::get("log", 1)); // Print the log array
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.