Skip to content

Commit 21282fd

Browse files
committed
Install: Add language resource to load terms
1 parent 966877b commit 21282fd

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

public/main/install/index.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,13 @@
9090
// Set translation
9191
$translator = new Translator($installationLanguage);
9292
$translator->addLoader('po', new PoFileLoader());
93+
94+
$langResourceFile = api_get_path(SYMFONY_SYS_PATH).'translations/messages.'.(explode('_', $installationLanguage, 2)[0]).'.po';
95+
96+
if (file_exists($langResourceFile)) {
97+
$translator->addResource('po', $langResourceFile, $installationLanguage);
98+
}
99+
93100
Container::$translator = $translator;
94101

95102
// The function api_get_setting() might be called within the installation scripts.

0 commit comments

Comments
 (0)