Added config property for locales

There's a new config property 'localesPath' - pointing to './locales' by default. The path resolution is similar to the docsPath, uploadsPath etc.

Signed-off-by: Erik Michelson <erik@liltv.de>
This commit is contained in:
Erik Michelson 2020-04-24 19:09:18 +02:00
parent 760591b9b0
commit 7838f9b03a
No known key found for this signature in database
GPG key ID: 6C1E7B9159DABCBA
4 changed files with 4 additions and 1 deletions

View file

@ -116,7 +116,7 @@ i18n.configure({
locales: ['en', 'zh-CN', 'zh-TW', 'fr', 'de', 'ja', 'es', 'ca', 'el', 'pt', 'it', 'tr', 'ru', 'nl', 'hr', 'pl', 'uk', 'hi', 'sv', 'eo', 'da', 'ko', 'id', 'sr', 'vi', 'ar', 'cs', 'sk'],
cookie: 'locale',
indent: ' ', // this is the style poeditor.com exports it, this creates less churn
directory: path.join(__dirname, '../locales'),
directory: path.resolve(__dirname, config.localesPath),
updateFiles: config.updateI18nFiles
})