Class TranslationResultImpl

    • Field Detail

      • UNKNOWN_RATING

        public static int UNKNOWN_RATING
    • Method Detail

      • getSourceLanguage

        public String getSourceLanguage()
        Description copied from interface: TranslationResult
        Gets the source language.
        Specified by:
        getSourceLanguage in interface TranslationResult
        Returns:
        The original source language. If this was not specified during the translation call it is determined by leveraging the Translation Detection functionality
      • getTargetLanguage

        public String getTargetLanguage()
        Description copied from interface: TranslationResult
        Gets the target language.
        Specified by:
        getTargetLanguage in interface TranslationResult
        Returns:
        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.
      • getCategory

        public String getCategory()
        Description copied from interface: TranslationResult
        Gets the category.
        Specified by:
        getCategory in interface TranslationResult
        Returns:
        The content category. If this was not specified during the translation call it is defaulted to "general"
      • getRating

        public int getRating()
        Description copied from interface: TranslationResult
        Gets the rating.
        Specified by:
        getRating in interface TranslationResult
        Returns:
        The rating of the returned translation. If unknown this will return -999.
      • getUserId

        public String getUserId()
        Description copied from interface: TranslationResult
        Gets the user id.
        Specified by:
        getUserId in interface TranslationResult
        Returns:
        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.