Lightweight and efficient imageboard
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

18 lines
406 B

<?php
use Gettext\Loader\PoLoader;
require 'inc/gettext/src/autoloader.php';
setlocale(LC_ALL, TINYIB_LOCALE);
$loader = new PoLoader();
$translations = $loader->loadFile('locale/' . TINYIB_LOCALE . '/tinyib.po');
function __($string) {
global $translations;
$translation = $translations->find(null, $string)->getTranslation();
if ($translation == '') {
return $string;
}
return $translation;
}