Skip to content

Commit bccd7aa

Browse files
committed
Update README.md
1 parent d30077b commit bccd7aa

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,18 @@ use EasySwoole\Http\Response;
116116
use Hyperf\Config\Config;
117117
use Hyperf\Contract\ConfigInterface;
118118
use Hyperf\Pimple\ContainerFactory;
119+
use App\Provider\TranslatorProvider;
120+
use App\Provider\TranslatorLoaderProvider;
119121

120122
class EasySwooleEvent implements Event
121123
{
122124
public static function initialize()
123125
{
124126
date_default_timezone_set('Asia/Shanghai');
125-
$container = (new ContainerFactory())();
127+
$container = (new ContainerFactory([
128+
TranslatorProvider::class,
129+
TranslatorLoaderProvider::class,
130+
]))();
126131
$container->set(ConfigInterface::class, new Config([
127132
'translation' => [
128133
'locale' => 'zh_CN',

0 commit comments

Comments
 (0)