tinyib/inc/gettext.php
Trevor Slocum b22ff54f12 Switch gettext library from v5.6.1 to v4.8.11
This restores compatibility with PHP 5+.

Relates to #273.
2023-09-09 09:13:00 -07:00

14 lines
323 B
PHP

<?php
use Gettext\Translator;
use Gettext\Translations;
setlocale(LC_ALL, TINYIB_LOCALE);
require 'inc/gettext/src/autoloader.php';
$translations = Translations::fromPoFile('locale/' . TINYIB_LOCALE . '/tinyib.po');
$translator = new Translator();
$translator->loadTranslations($translations);
$translator->register();