docker support
This commit is contained in:
parent
e965115aa4
commit
9669ec376f
1 changed files with 3 additions and 1 deletions
|
@ -56,8 +56,10 @@ const getLocale = async (client: Client) => {
|
|||
const default_lang = 'en';
|
||||
|
||||
// Check if there is a defined valid value
|
||||
const old_path = __dirname.split('/');
|
||||
old_path.pop();
|
||||
const lang = client.config.lang === undefined ? default_lang : existsSync(
|
||||
`./src/locales/${client.config.lang}.json`,
|
||||
`${old_path.join('/')}/locales/${client.config.lang}.json`,
|
||||
) ? client.config.lang : default_lang;
|
||||
|
||||
// Fallback to default language in case lang isn't valid
|
||||
|
|
Loading…
Reference in a new issue