//MetaPhrase/com.github.diegoberaldin.metaphrase.domain.mt.repository/MachineTranslationRepository/getTranslation
getTranslation
[jvm]
abstract suspend fun getTranslation(provider: MachineTranslationProvider = MachineTranslationProvider.MY_MEMORY, key: String? = null, sourceMessage: String, sourceLang: String, targetLang: String): String
Get a suggestion (translation) from machine translation.
Return
a suggestion from the MT provider
Parameters
jvm
provider | Machine translation provider |
key | API key for the provider (optional) |
sourceMessage | Message to translate |
sourceLang | Source language code |
targetLang | Target language code |