How to clear php's gettext cache without restart Apache nor change domain?

前端 未结 6 1541
别跟我提以往
别跟我提以往 2020-12-03 07:34

This is a little code snippet from php manual:

putenv(\'LC_ALL=zh_CN\');
setlocale(LC_ALL, \'zh_CN\');

bindtextdomain(\'domain\', \'./locale\');
textdomain(         


        
6条回答
  •  被撕碎了的回忆
    2020-12-03 07:39

    There is IMHO no direct way to do that (besides domain workaround you've mentioned), that's reason why we're using php-gettext.

    Update: Which we've started to maintain as motranslator, installable by Composer and compatible with all PHP versions.

提交回复
热议问题