public function createI18n(array $args)
    {
        $i18n = new I18n;
        I18nShortcut::setInstance($i18n);

        // Add all module paths to the I18n object
        $modules = $this->app->resolver->getResolver("language");
        $log = \Wedeto\Log\Logger::getLogger(I18nPlugin::class);
        
        $search_path = $modules->getSearchPath();
        foreach ($search_path as $name => $path)
        {
            $i18n->registerTextDomain($name, $path);
        }

        // Set a language
        $site_language = $this->app->config->dget('site', 'default_language', 'en');
        $locale = $args['locale'] ?? $site_language;
        $i18n->setLocale($locale);

        $this->setupTranslateLog();

        return $i18n;
    }