Implementing Plugin for Google Cloud Translation API V3

Hello,

I've been trying to implement a machine translation plugin that uses Google Cloud Translation's AutoML models.

Google's tutorials on how to use it all involved the used of the Google.Cloud.Translate.V3 C# library to request a translation, but using it for a Trados Studio plugin resulted in the following error:

Could not load file or assembly 'Google.Cloud.Translate.V3, Version=1.0.0.0. Culture=neutral, PublicKeyToken=185c282632e132a0' or one of its dependencies. The system cannot find the file specified.

Which I assume means that the library isn't supported by Trados Stuio.

So I'm wondering if there is another way to implement the method without using Google's library.

Parents Reply Children
  • Hello.

    Thank you again for the reply. I've tried removing the Google.Apis.Auth PublicKeyToken, but the plugin is still giving the same error.

    I've also checked the dependencies off all the app's third-party libraries, and saw that the one trying to call Google.Apis.Auth Version 1.21.0.0 is the Grpc.Auth library.

    (Note: In the previous reply I referred to the wrong version of Google.Apis.Auth. The version I have installed is 1.41.1.0)

    It can't be removed because the Google.Api.Gax.Grpc library requires it, which is in turn required by the Google.Cloud.Translate.V3 library I'm trying to use.

    There doesn't seem to be any issue with the Google.Apis.Auth bindingRedirect in the app.config file, either.

    Is there anything else that I'm missing and/or could have caused the issue?

    Incl. some screenshots for reference:

  • Hi ,

    Sorry for taking so long to respond. Now we are adding the support to V3 in MT Enhanced indeed we have the same issue as you have. Partially I managed to fix the error you have by manually download the api references from Nuget but they need to gave a specific version to be compatible.

    Visual Studio project references list including Google.Api.Gax.Grpc, Google.Cloud.Translate.V3, and other related libraries.

    In order to fix the problems I had to upgrade to the latest version of Google.Api.Gax.Grpc but that version is not supported by the Google.Cloud.Translate.V3 library

    Error message in code editor stating compatibility issues between Google.Api.Gax.Grpc and Google.Cloud.Translate.V3 libraries.

    Our solution is not to use the client and use the API Urls (https://cloud.google.com/translate/docs/migrate-to-v3)

    Have a nice day,

    Andrea Ghisa

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 10:50 AM (GMT 0) on 4 Mar 2024]