You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php
require __DIR__.'/vendor/autoload.php';
setlocale(LC_ALL, 'en-US');
$t = new \Gettext\GettextTranslator();
//Set the language and load the domain
$t->setLanguage('gl');
$t->loadDomain('messages', 'Locale');
And there are errors following...
Deprecated: setlocale(): Passing locale category name as string is deprecated. Use the LC_* -constants instead
Warning: setlocale(): Invalid locale category name LC_MESSAGES, must be one of LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, or LC_TIME
The text was updated successfully, but these errors were encountered:
It seems that LC_MESSAGES is not available. According with the documentation, this constant is available only if PHP was compiled with libintl. So Translator::setLanguage() should check whether the constant exists before use them, and if not, use LC_ALL instead.
Thanks for the report, I'll fix this ASAP.
my code:
And there are errors following...
The text was updated successfully, but these errors were encountered: