1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2025-01-14 14:43:17 +08:00
pigallery2/backend/model/Localizations.ts

20 lines
555 B
TypeScript
Raw Normal View History

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