Jump to content

Fluency Translator Plugin is not working


SIERRA
 Share

Recommended Posts

Hi,

We added the Fluency Module and installed it in our ProcessWire setup.

We have two languages: Default and Tamil.

We are using the "Google Cloud Translation" engine in the Fluency Module and have added the Google Cloud API key. However, we are seeing the following message:

"ProcessWire: The translation service is not available, please try again later."

(Please find the attachments below.)

Could you please suggest how to proceed further?

fluency-1.png

Screenshot_1.png

Screenshot_9.png

Link to comment
Share on other sites

@SIERRA Hey there- I missed this because I wasn't tagged and it wasn't posted under the Fluency support thread.

That message indicates that the Fluency module attempted to connect to the translation service API but was not able to get a response, or there was an unexpected response from Google. Can you check the entries in Setup > Logs > fluency-engine and see if there are any details you can share?

Fluency requires that curl be installed to make API calls, can you confirm that it's configured on your server?

Link to comment
Share on other sites

@SIERRA I'm having difficulty replicating. I just set up translation using Google Cloud Translation from scratch and it worked. Here are the steps I took:

  1. Create a new Google Cloud API key using these steps.
  2. Enabled the Cloud Translation API in Google Console at https://console.cloud.google.com using these steps. The only required steps are located under these headings:
    1. Create or select a project
    2. Enable billing
    3. Enabling the API
  3. Ensure that your API key is authorized to use Google Cloud Translation

1338135258_Screenshotfrom2024-09-1808-18-08.png.716cf7c1a78a9c76c9d2f6c99a7e7aae.png

You do not need to set up OAuth to use Fluency. Only an API key that has permission to use Cloud Translation.

Fluency can only show/log the errors that are provided so, unfortunately, receiving a response from the Google API with no message doesn't help with troubleshooting. The Google Translation Engine in Fluency handles errors according to their API spec and, in the event of an error, expects one of the following Google response error codes:

  • NOT_FOUND
  • UNAUTHENTICATED
  • PERMISSION_DENIED
  • INVALID_ARGUMENT
  • RESOURCE_EXHAUSTED
  • INTERNAL
  • UNAVAILABLE

If none of these codes is returned, Fluency falls back to unavailable which provides that vague log entry with an empty message because Google didn't actually return an error message.

If you can walk through the steps above you should be able to get up and running. Also double check that your billing is properly set up. IIRC, it's necessary to have billing configured even if you are planning to stay within your free monthly allocation of API services use.

I'm not sure what to do beyond that, but let me know if this helps!

Link to comment
Share on other sites

@FireWire Thanks for your information.

We have a few queries regarding Cloud Translation API pricing and translation for our website.

  1. We have approximately 400,000 to 500,000 words. Currently, we are looking to translate the site into Tamil. Please find the attachment and suggest which pricing option would suit us.
  2. Does the Cloud Translation API offer a one-time purchase option for translating the entire website? If yes, could you kindly provide details regarding this option?
  3. Additionally, if we enable the Cloud Translation API for the first month, will the translated content remain accessible if we disable the Cloud Translation API after the first month?
  4. How many words can we do translation freely using Cloud Translation API.
  5. Lastly, is there an option for manual translation?

Screenshot_8.png

Edited by SIERRA
Link to comment
Share on other sites

@SIERRA I use Google Cloud services for some things but I'm not really an expert on it. I can provide some information that I am familiar with but you'll need to do research to determine if it fits your needs. I built a module that interfaces with a Google service but it doesn't provide any special insights. I'll start off with the easy answers first.

8 hours ago, SIERRA said:

Additionally, if we enable the Cloud Translation API for the first month, will the translated content remain accessible if we disable the Cloud Translation API after the first month?

Yes. Fluency translates the content that you enter into ProcessWire into other languages using the third party service, then enters that translated content into ProcessWire which is then stored in your website's database. This is stored the same way as if you had manually entered the content in other languages yourself. Even if you translated content for your website and then uninstalled Fluency altogether your translated content is stored in ProcessWire and is yours to keep.

8 hours ago, SIERRA said:

How many words can we do translation freely using Cloud Translation API.

Third party translation services almost always, as far as I've seen, charge by character count. This is because words and phrases may be different lengths in different languages. It's not really possible to guess ahead of time what your character count will be according to word count, the best way to determine that is to translate some content then check your Google Cloud account to see how many characters you have used and then come up with an estimate based on that information.

See my note below on using Google's tools to estimate this.

8 hours ago, SIERRA said:

Lastly, is there an option for manual translation?

Yes. ProcessWire's language support adds tabs to each multi-language field. If you manually add content to the fields under each tab and don't use Fluency to perform translation then you will have not used any translation service credits. That said, consider the following:

image.png.de3eb55375a6234ba4c8c0bb09e1540e.png
Here you can see that Fluency is set up with the "Translate to all languages" option configured. This means that if you have entered content in any language and click "Translate to all languages", Fluency will translate that content into all of the other languages and then replace anything that has been already been entered under other language tabs. This is intentional behavior. If you use this option and have already added content that you are satisfied with in another language, then clicking "Translate to all languages" may be unnecessary because it will translate your content and overwrite it anyway.

8 hours ago, SIERRA said:

We have approximately 400,000 to 500,000 words. Currently, we are looking to translate the site into Tamil. Please find the attachment and suggest which pricing option would suit us.

I'm not able to tell you want to do and I don't want to be responsible for any charges that came about due to bad information on my part. Google provides plenty of information about how they charge for their services and I would just be doing the same research that you would need to do to fit your use case. Google has a pricing calculator that you can use to estimate costs for usage of any Google Cloud services, including translation. Here's the link to check it out.

8 hours ago, SIERRA said:

Does the Cloud Translation API offer a one-time purchase option for translating the entire website? If yes, could you kindly provide details regarding this option?

No. Their billing is based on services usage per month so you will only pay for what you use. There isn't really a service that exists, as far as I know of, that would charge a flat fee for "a website" because that could mean a very large website or a very small website.

I'll make a couple of recommendations that may help you out in this situation.

If this is for a client, then the costs of using third party services are what they are. You don't have control over pricing or how much they ultimately intend to use the service because this is content that they will provide. The estimated content range of 400,000 to 500,000 words is very wide and not accurate. That range is 20% and won't be accurate, especially considering that the charges are in characters and not words which each have different character counts . To put this into context, a quick search found that the average length of a novel is 40,000 to 70,000 words long. That means the difference between the two word counts in your case is anywhere from 1-2 entire books you'd find at a book store- that isn't trivial!

The best idea is to work on getting accurate pricing is to try and get a much more accurate estimate on length of content. Book publishers would not accept a 100,000 give-or-take estimate from an author in how long a novel is because there are real costs involved, and the same would best be true in this case. Here's a few things that you may be able to do:

  • If you have all of the content ahead of time, then get an accurate character count and pad it a little to get a price you can work with.
  • If you have some of the content, but not all, take estimate the percentage that content is relative to the entire amount of content, get the character count, and multiply it. If you estimate that you have 10% of the content right now, get the character count and multiply that by 10, then add a little to be safe, and estimate your costs.
  • If the website will list products, or blog posts, or something that repeats, estimate the amount of content for one and then multiply that by an estimate of the number of whatever will be repeated on the site. It's much easier to estimate the content for one item of many and then estimate the number of how many there will be. If you already have a few examples, get the character count for each and calculate the average before multiplying.

Hope that helps. Just trying to offer some advice that may be useful.

  • Like 3
Link to comment
Share on other sites

@FireWire Thank you very much for your detailed information.

It is very useful to us.

One more question: please find the attachment and suggest which pricing will suit us in the google Cloud Translation Api.

  • AutoML Translation Model Training Operations
  • AutoML Translation Online Predictions Operations
  • AutoML Translation Model Online Prediction In Translation V3 Document Translation.
  • Language Detection
  • Adaptive MT Translation Input Characters
  • Adaptive MT Translation Output Characters
  • Neural Translation Model Predictions
  • Neural Translation Model Predictions In Translation V3
  • Neural Translation Model Online Prediction In Translation V3 Document Translation.
     

Screenshot_8.png

Edited by SIERRA
Link to comment
Share on other sites

7 hours ago, SIERRA said:

please find the attachment and suggest which pricing will suit us

 I'm just going to quote myself to make sure that you read my response:

21 hours ago, FireWire said:

I'm not able to tell you want to do and I don't want to be responsible for any charges that came about due to bad information on my part. Google provides plenty of information about how they charge for their services and I would just be doing the same research that you would need to do to fit your use case. Google has a pricing calculator that you can use to estimate costs for usage of any Google Cloud services, including translation. Here's the link to check it out.

I'm a software developer that built and maintains a module for ProcessWire, not a Google product specialist. Please stop asking me to do your work for you.

  • Like 4
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...