Interface TranslationResult

  • All Known Implementing Classes:

    public interface TranslationResult
    The TranslationResult is returned from all translation calls. It contains the translated string as well as other data related to the translation call. It is possible some of the values returned from a service will be NULL but the TranslationResult object it self will never return as NULL.
    • Method Detail

      • getTranslation

        java.lang.String getTranslation()
        Gets the translation.
        The translation response from the Machine Translation engine
      • getSourceLanguage

        java.lang.String getSourceLanguage()
        Gets the source language.
        The original source language. If this was not specified during the translation call it is determined by leveraging the Translation Detection functionality
      • getTargetLanguage

        java.lang.String getTargetLanguage()
        Gets the target language.
        The target language. If this was not specified during the translation call it may be determined based on the Resource path, Resource locale, or locale of the user.
      • getContentType

        TranslationConstants.ContentType getContentType()
        Gets the content type.
        The content type of the Source String and the Target String it was translated into.
      • getCategory

        java.lang.String getCategory()
        Gets the category.
        The content category. If this was not specified during the translation call it is defaulted to "general"
      • getSourceString

        java.lang.String getSourceString()
        Gets the source string.
        The original source String that was translated.
      • getRating

        int getRating()
        Gets the rating.
        The rating of the returned translation. If unknown this will return -999.
      • getUserId

        java.lang.String getUserId()
        Gets the user id.
        The ID corresponding to the user who edited the current translation. This might be the user who is currently editing a translation (@see TranslationService.storeTranslation) or the user who edited the currently returned translation (@see TranslationService.translateString). This field might be blank or null depending on the availability of this data.