1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2024-12-29 02:12:25 +02:00
pigallery2/backend/model/Localizations.ts

20 lines
555 B
TypeScript
Raw Normal View History

2018-03-30 21:30:30 +02:00
import {ProjectPath} from '../ProjectPath';
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';
export class Localizations {
constructor() {
}
public static init() {
const notLanguage = ['assets'];
const dirCont = fs.readdirSync(ProjectPath.FrontendFolder)
2019-02-23 00:39:01 +02:00
.filter(f => fs.statSync(path.join(ProjectPath.FrontendFolder, f)).isDirectory());
Config.Client.languages = dirCont.filter(d => notLanguage.indexOf(d) === -1);
2018-03-30 21:30:30 +02:00
Config.Client.languages.push('en');
}
}