Skip to content

Commit

Permalink
Add support for site translations
Browse files Browse the repository at this point in the history
  • Loading branch information
giuscris committed Feb 15, 2025
1 parent 7d1c03c commit a533fab
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions formwork/config/system.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ translations:
paths:
panel: '${system.panel.path}/translations'
system: '${%SYSTEM_PATH%}/translations'
site: '${%ROOT_PATH%}/site/translations'

updates:
time: 900
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function load(Container $container): object
public function onResolved(object $service, Container $container): void
{
$service->loadFromPath($this->config->get('system.translations.paths.system'));
$service->loadFromPath($this->config->get('system.translations.paths.site'));
$service->setCurrent($this->languages->current() ?? $this->config->get('system.translations.fallback'));
}
}
Empty file added site/translations/.gitkeep
Empty file.

0 comments on commit a533fab

Please sign in to comment.