An easy library to create multilingual support Telegram Bots
<?php
use okayinc;
$l = new language('language', 'default');
echo $l->get('index');
Where:
- language is the current language to use, a file returning the associative index must exist, such as en.php, es.php, fr.php
- default is the default language incase the index of the main language doesnt exists, by default is english
$l = new language('en');
echo $l->get('index');
en.php
<?php
return [
'index' => 'Your index is',
];
es.php
<?php
return [
'index' => 'Tu índice es',
];