instantiator = $instantiator; } private function resolve(): LocalizationContext { if ( !$this->context ) { $this->context = ( $this->instantiator )(); } return $this->context; } public function getLanguageCode() { return $this->resolve()->getLanguageCode(); } public function msg( $key, ...$params ) { return $this->resolve()->msg( $key, ...$params ); } }