code: 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;
      }
docs: Factory method to create the I18n instance. Registered with Wedeto\DI to
  make sure that new instances are created here.