Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

 

Posted

Now, you do not really provide any info about how you have developed the function, nor any details on which errors you are seeing.

If you want some guidance here, please provide more details to the code, errors, screenshots etc.

Posted

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
Posted

Yes, my goal was to perform this script on the server : and you're right it doesn't work !

But how to do without the function "Web Viewer" which is not available on a server... ?

A

Posted

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

Posted
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?

Posted

Instead of scraping a web viewer, could you use "insert from URL" script step to set the returned HTML to a field? That script step can run from server.

Posted

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

Posted
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.

  • 2 weeks later...
Posted

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

This topic is 3041 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.