2018-03-30 21:30:30 +02:00
|
|
|
import {ProjectPath} from '../ProjectPath';
|
2018-05-12 18:19:51 +02:00
|
|
|
import * as fs from 'fs';
|
|
|
|
import * as path from 'path';
|
2018-03-30 21:30:30 +02:00
|
|
|
import {Config} from '../../common/config/private/Config';
|
2017-12-25 01:42:25 +02:00
|
|
|
|
|
|
|
export class Localizations {
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
}
|
|
|
|
|
|
|
|
public static init() {
|
|
|
|
const notLanguage = ['assets'];
|
2018-05-12 18:19:51 +02:00
|
|
|
const dirCont = fs.readdirSync(ProjectPath.FrontendFolder)
|
2019-02-23 00:39:01 +02:00
|
|
|
.filter(f => fs.statSync(path.join(ProjectPath.FrontendFolder, f)).isDirectory());
|
2018-05-12 18:19:51 +02:00
|
|
|
Config.Client.languages = dirCont.filter(d => notLanguage.indexOf(d) === -1);
|
2018-03-30 21:30:30 +02:00
|
|
|
Config.Client.languages.push('en');
|
2017-12-25 01:42:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|