import { TranslateLoader } from '@ngx-translate/core';

import { Observable } from 'rxjs/Observable';

import 'rxjs/add/observable/of';
import 'rxjs/add/observable/throw';

export class TranslateLoaderMock implements TranslateLoader {
    getTranslation(lang: string): Observable<any> {
        if (lang === 'en') {
            return Observable.of({ '[page not found]': 'page not found' });
        }
        if (lang === 'ru') {
            return Observable.of({ '[page not found]': 'страница не найдена' });
        }
        return Observable.throw('not available language');
    }
}
