import { I18nService , translateOptions } from './services/i18n.service' ; export class I18nContext { constructor ( readonly detectedLanguage , private readonly service ) { } public translate ( key , options ? ) { options = { lang : this . detectedLanguage , ... options , } ; return this . service . translate ( key , options ) ; } public t ( key , options ? ) { return this . translate ( key , options ) ; } }