---
title: "TranslateListener"
sidebar_label: "TranslateListener"
description: "Kotlin binding reference: TranslateListener."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.modelverse](../index.md)/[TranslateListener](index.md)

# TranslateListener

[common]\
interface [TranslateListener](index.md)

The outcome of one translation request. The calls arrive on the model's own worker thread: [onTranslations](onTranslations.md) with one translation per input text, in order, then exactly one of [onDone](onDone.md) or [onError](onError.md).

## Functions

| Name | Summary |
|---|---|
| [onDone](onDone.md) | [common]<br>abstract fun [onDone](onDone.md)(report: [TranslateReport](../TranslateReport/index.md))<br>The request ended; [report](onDone.md) says what it cost. |
| [onError](onError.md) | [common]<br>abstract fun [onError](onError.md)(message: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html))<br>The request failed, or was refused before the model ran; nothing follows. |
| [onTranslations](onTranslations.md) | [common]<br>abstract fun [onTranslations](onTranslations.md)(translations: [List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)&lt;[Translation](../Translation/index.md)&gt;) |