Jump to content

Mac Server 14 and API Google translation


This topic is 2829 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Dear all,

By reading this post you'll know that i've a urgent need to use the google translation from French to English.

I've developed a small databse which uses the Api Google translation. It works on Mac OS 10-11, and FileMaker Advances 15

Then i've tested it and, it's thrue, it really works, quickly and smart.

So i've tried to install this new routines to a solution who runs on FileMaker Server 14.

And no way... It doesn't work.

I'm sure one of you, guys, knows what to do, or at least has a path to guide me.

Thanks

Antoine

 

Link to comment
Share on other sites

You'right ! Apologizes...

I 've written a single script :

["Text" is a unique table / Text::Text_1 is a text field for the text to translate / Text::translation_From and Text::translation_To are two fields to define the translation 

Define Web Wiever ("Google") / Goto the URL : ""https://www.googleapis.com/language/translate/v2?key=########API KEY#########&"&q="&Text :: Text_1 &"&source="&Text::translation_From&"&target="&Text::translation_To

Wait 2 sec

Define $GG_Answer ; ObtenirAttributObjetModele("Google"; "content")

Define field (Text_2; ParseData( $GG ; "\"translatedText\": \"" ; "\"" ; 1 )

It's look easy and smart, no ?

What ever, it works with FMP Advanced 14.

The same script used by an another solution (?) or an other FMP_Application (?) on the server FM Server 14 gives no result. 

I've to change "Wait 2sec" to "10", then "15, then i tried with a "boucle" until Not IsEmpty ObtenirAttributObjetModele("Google"; "content")

No success...

Many thanks for your helop

A

  • Like 1
Link to comment
Share on other sites

Because i share a "solution" with partners and colleagues by a FMServer.

And i'd like to add a translation service in this "solution" (sorry in Franch, we said "solution" for a FileMaker Application an i do not know the word in English)

So how to do ?

A

Link to comment
Share on other sites

6 minutes ago, Antoine said:

Because i share a "solution" with partners and colleagues by a FMServer.

That's a reason to host a solution on a server. It doesn't mean you have to perform every script on the server machine.

How is this script initiated?

Link to comment
Share on other sites

Well, I'm not sure to know how managing various place ans where is the best place to perform the script. 

My "solution" is all shared by the server : layouts, datas etc... Each collagues use a FM_14 and connect themselves to the server.

Mike, i'll try this ans tell you the results... in few minutes !

Thanks to all

A

Great Mike ! IT WORKS !

Many thanks !

A

Link to comment
Share on other sites

18 minutes ago, Antoine said:

My "solution" is all shared by the server : layouts, datas etc... Each collagues use a FM_14 and connect themselves to the server.

Well, then if one of you sets a field to some value and commits the record, that value will be seen by all other users (unless that field is a global field). That's what sharing a solution is all about.

That's not to say that using a web viewer is a good method to get data from an API. I'm just puzzled at the requirement to do it on the server.

Link to comment
Share on other sites

  • 2 weeks later...

Well, some news to my new friends.

It works... with my own Mac, not on my collagues ones.

Probably because i've bought the rights for using the Google API from it. 

I'll buy a new access to the Google API from the server and i'll tell you...

A

Link to comment
Share on other sites

This topic is 2829 days old. Please don't post here. Open a new topic instead.

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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.