Google Translate Service

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
JHPJHP
Addict
Addict
Posts: 1851
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Google Translate Service

Post by JHPJHP »

-----------------------------------------------------------------------------------

Download Google Translate Service from My PureBasic Stuff

-----------------------------------------------------------------------------------

Announcements
PureBasic Interface to OpenCV
PureBasic Interface to WinDivert
PureBasic Interface to WinRAR
PureBasic Interface to 7-Zip
PureBasic Interface to ImDisk
Windows Services & Other Stuff
Invading Space Aliens
Death Star vs Asteroids
GIF Toolkit
LSB Image Steganography
Spider Web Drawing
Deform Image: MLS
Video Snipping Tool
Chromium Edge WebGadget
IAccessible Interface
Stitch Images: SIFT
OldSkool Fire Effect
Image Waves: LUT
YouTube Player & Downloader
MP4 Player & Downloader
Large Image Viewer
Barcode Generator
Google Translate Service
Embed JS into PureBasic
Geolocation: Google Maps
Book & Viewer & Magnify
Video for Windows: VfW
Alternate Console
Network Share Management

-----------------------------------------------------------------------------------

Using the PureBasic WebGadget and the technology behind Google Translate, combined with some inventive programming, I was able to produce what I hope is a fairly stable tool.

My original intent was to create a Windows Service that ran in the background, to simplify translating forum messages, documents, etc. to and from any language.
As I continued programming it became obvious that it was better as a tool then a service, but I liked the name so I kept it.

The Google Translate "Service" can run window-less, without any indication that it's active, utilizing Ctrl keys to perform various actions.

Google Translate Service ✚ Help Viewer

- Mouse Click ➤ Bottom Buttons -
Ctrl + F1 ◆ Open • Close Help Viewer
Ctrl + F2 ◆ Open • Close Clipboard Viewer
Ctrl + F3 ◆ Open • Close Options Panel

- Drag & Drop ➤ Bottom Buttons -
Ctrl + F4 ◆ Copy Translation
Ctrl + F5 ◆ Copy • Paste Translation

- Drag & Drop ➤ Bottom Buttons -
Ctrl + F6 ◆ Listen • Stop Source Selection
Ctrl + F7 ◆ Listen • Stop Target Translation

- Clipboard Viewer ➤ Context Menu -
Ctrl + Esc ✱ Terminate Translate Service


Other options are to work from the window interface or a combination of the two; from simple translation to more advanced text replacement.
Last edited by JHPJHP on Sat Oct 16, 2021 8:58 pm, edited 10 times in total.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
JHPJHP
Addict
Addict
Posts: 1851
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Google Translate Service

Post by JHPJHP »

Clipboard Viewer with Context Menu and Options Panel

The first three Ctrl "buttons" at the bottom of the Clipboard Viewer are clickable and the next four are draggable, simulating Ctrl key actions.
From Clipboard Viewer's context menu, under Advanced Options is a simple yet powerful feature that utilizes Regular Expressions for text replacement.

Image Image
Last edited by JHPJHP on Sat Jul 24, 2021 11:12 pm, edited 4 times in total.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
JHPJHP
Addict
Addict
Posts: 1851
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Google Translate Service

Post by JHPJHP »

Updated:
- various updates and improvements

NOTES:
All downloads require an access key.
Access key is emailed after a one time $20 CAD donation.
Good for all current and future scripts, programs, and updates.

------------------------------------------------------

Here is a short animation demonstrating one of the Google Translate Service features; animation created using the Video Snipping Tool.
- copied a selection of code to the clipboard
- used an existing Regular Expression to filter the list
- removed parts of the list not wanting translated
- translated the remaining list
- applied the translated filter

Animation created using Video Snipping Tool
Image
Last edited by JHPJHP on Tue Aug 31, 2021 6:07 pm, edited 2 times in total.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
AMpos
Enthusiast
Enthusiast
Posts: 128
Joined: Fri Jun 05, 2020 12:47 am

Re: Google Translate Service

Post by AMpos »

Hi!

Can you explain me what is your program for?

Thank you.
User avatar
DoubleDutch
Addict
Addict
Posts: 3206
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Google Translate Service

Post by DoubleDutch »

This looks great for getting translation strings for app or games.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
JHPJHP
Addict
Addict
Posts: 1851
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Google Translate Service

Post by JHPJHP »

Hi AMpos,
DoubleDutch wrote:This looks great for getting translation strings for app or games.
Here are just a few more features...

Multiple Modes:
- Window-less: Close the Clipboard Viewer
- Semi-Transparent: Double-click the Clipboard Viewer window
- Extended: Set from the Clipboard Viewer context menu
- Minified: Set from the Clipboard Viewer context menu

Forum posts, documents, emails, etc. can be written in your native language, then translated in-place.
- select the text you want translated
- press CTRL + F5 to replace the selected text with the translated text

NOTE: Ctrl keys can be disabled; the F4 - F7 buttons located at the bottom of the Clipboard Viewer are draggable, simulating their key action when dropped onto selected text.

Copy and translate text documents up to 100,000 characters into the Clipboard Viewer.
Listen to selected text, read aloud, translated into your native language.

When the option URL Hotspots is enabled from the context menu, web hyperlinks within the Clipboard Viewer can be clicked, opening your default browser to the translated webpage.

NB*: As with everything I have written in PureBasic, the full source code is included with the download.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
DoubleDutch
Addict
Addict
Posts: 3206
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Google Translate Service

Post by DoubleDutch »

Amazing value for money. I'll pay the access fee and take a better look sometime this weekend. Thanks for making the code available. :)

Update: Paid (see deluxepixel donation)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
JHPJHP
Addict
Addict
Posts: 1851
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Google Translate Service

Post by JHPJHP »

Hi DoubleDutch,
DoubleDutch wrote:Amazing value for money. I'll pay the access fee and take a better look sometime this weekend. Thanks for making the code available.
Thank you very much for your donation, I hope you find something useful or at least entertaining.
Your access key was emailed to the address you provided through PayPal.

You may also want to take a look at Windows Services & Other Stuff, it contains additional Google Translate scripts...
\Other_Stuff\GoogleTranslate\GoogleTranslate.pb: original version without the graphics overhead
\Other_Stuff\GoogleTranslate\GoogleTranslate_DLL.pb: DLL version (see scripts folder) for processing files

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
DoubleDutch
Addict
Addict
Posts: 3206
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Google Translate Service

Post by DoubleDutch »

Thanks. I'll be using your routines in my internal tools for translating my games ( See: https://deluxepixel.com/games ). :)

(once I update them and use it, I'll put a link to your site...)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
JHPJHP
Addict
Addict
Posts: 1851
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Google Translate Service

Post by JHPJHP »

Hi DoubleDutch,

[quote=""DoubleDutch"]I'll be using your routines in my internal tools for translating my games[/quote]
If you notice any problems or have improvement suggestions, please don't hesitate to post here or @ My PureBasic Stuff.

Just visited Deluxe Pixel Limited and played Zombie Rocks! and Save the Martians! (fun sound effects); great games, and I really liked the online playability.

Also visited your Twitter profile... very cool that in 1989 you made a game for the NES.

Here is one of two attempts I tried at creating a retro style game: Invading Space Aliens; both games are available from my website.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
DoubleDutch
Addict
Addict
Posts: 3206
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Google Translate Service

Post by DoubleDutch »

Glad you like them. I make them with my kids to show how we used to code them in the 'old days'. :)

Zombie Rocks is basically a mix of Boulderdash and Dig Dug - it's a work in progress.

Save the Martians was basically something I made to show kids how to start coding a simple game for Code Club (an hour a week showing 8 to 10 year olds how to code).

Here is an advert for the NES game: https://www.youtube.com/watch?v=IsvPcTQL6zk

I'll take a look at your games on the site later tonight (downloading everything!)...
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
JHPJHP
Addict
Addict
Posts: 1851
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Google Translate Service

Post by JHPJHP »

Updated:
- added Timeout Patch
- couple minor improvements
- squashed a couple bugs

Because the WebGadget uses IE11 and most of my testing was with Edge, I'm just now finding quirks that only occur in IE when translating from some of the more obscure languages...

Removed Time Out from Options Panel and replaced it with Timeout Patch.

Timeout Patch
If a timeout warning occurs during a translation, it might be due to an IE limitation. Enabling Timeout Patch might fix the issue, but slows the translation process.

NB*: The scripts located in Windows Services & Other Stuff\Other_Stuff\GoogleTranslate have also been updated.
Last edited by JHPJHP on Sun Nov 01, 2020 2:40 am, edited 4 times in total.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
Ural4320
New User
New User
Posts: 7
Joined: Fri Oct 30, 2020 6:59 pm

Re: Google Translate Service

Post by Ural4320 »

Be careful with Google Translate though, if you're planning to use it for anything resembling commercial and/or professional uses, you'd better have someone ready to touch up (read: rewrite entirely) the translation. I recently had the "pleasure" to deal with Google-translated news articles when writing a piece about the citizenship by investment in Spain https://tranio.com/spain/passport/ at work, and it was easier for me to go find the original Spanish text, guess what I could deduce from what sounded close to French and Italian (since I speak these languages) and search for difficult words on Reverso or similar online translation services.
If you're looking to translate words or short 2-3 word series, though, it could do the trick.
User avatar
JHPJHP
Addict
Addict
Posts: 1851
Joined: Sat Oct 09, 2010 3:47 am
Contact:

Re: Google Translate Service

Post by JHPJHP »

Updated:
- added History Viewer
- some minor improvements

History Viewer
Available from the context-menu.

NB*: Filter by partial (case insensitive) Date / Time, Translate Text, or Translation Text.

Image
Last edited by JHPJHP on Wed Mar 24, 2021 3:25 pm, edited 1 time in total.

STATUS: Mostly Unavailable :: Downloads moved to My PureBasic Stuff; free executables, access key required for source code.
_________________
User avatar
Tenaja
Addict
Addict
Posts: 1829
Joined: Tue Nov 09, 2010 10:15 pm

Re: Google Translate Service

Post by Tenaja »

Thanks for sharing--this looks like it could come in handy.
Post Reply