mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08:00
19 lines
552 B
TypeScript
19 lines
552 B
TypeScript
import {ProjectPath} from '../ProjectPath';
|
|
import * as fs from 'fs';
|
|
import * as path from 'path';
|
|
import {Config} from '../../common/config/private/Config';
|
|
|
|
export class Localizations {
|
|
|
|
constructor() {
|
|
}
|
|
|
|
public static init() {
|
|
const notLanguage = ['assets'];
|
|
const dirCont = fs.readdirSync(ProjectPath.FrontendFolder).filter(f => fs.statSync(path.resolve(ProjectPath.FrontendFolder, f)).isDirectory());
|
|
Config.Client.languages = dirCont.filter(d => notLanguage.indexOf(d) == -1);
|
|
Config.Client.languages.push('en');
|
|
}
|
|
|
|
}
|