July 14, 20169 yr 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
July 14, 20169 yr 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.
July 14, 20169 yr Hi Antoine and welcome to the FM Forums. Claus makes a good point. Please read this article on Anatomy of a Good Topic
July 14, 20169 yr Author 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
July 14, 20169 yr 7 minutes ago, Antoine said: I 've written a single script Are you trying to perform this script on the server? Because that won't work.
July 14, 20169 yr Author 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
July 14, 20169 yr Author 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
July 14, 20169 yr 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?
July 14, 20169 yr 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.
July 14, 20169 yr Author 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
July 14, 20169 yr 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.
July 26, 20169 yr Author 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
Create an account or sign in to comment