fecshop_local.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. // 本文件在app/web/index.php 处引入。
  3. // fecshop的核心模块
  4. $modules = [];
  5. foreach (glob(__DIR__.'/fecshop_local_modules/*.php') as $filename) {
  6. $modules = array_merge($modules, require($filename));
  7. }
  8. // services
  9. $services = [];
  10. foreach (glob(__DIR__.'/fecshop_local_services/*.php') as $filename) {
  11. $services = array_merge($services, require($filename));
  12. }
  13. // 组件
  14. $components = [
  15. 'i18n' => [
  16. 'translations' => [
  17. 'apphtml5' => [
  18. 'basePaths' => [
  19. '@apphtml5/languages',
  20. ],
  21. // base language code
  22. 'sourceLanguage' => 'en_US',
  23. /**
  24. * @var bool whether to force message translation when the source and target languages are the same.
  25. * Defaults to false, meaning translation is only performed when source and target languages are different.
  26. * see: @yii/i18n/MessageSource.php @property $forceTranslation
  27. */
  28. 'forceTranslation' => true,
  29. ],
  30. ],
  31. ],
  32. ];
  33. return [
  34. 'modules' => $modules,
  35. 'services' => $services,
  36. 'components' => $components,
  37. ];