This example allows you to use Google translate API in LabVIEW through the LabVIEW Python Node.
This example consists of Python Node Google Translate.vi and Google_Translate.py. There are methods for using the Google Translate API with Python, and LabVIEW Python Nodes can call these methods to use the Google Translate API in LabVIEW.
Among the many features provided by the Google Translate API, the core "Translate" and "Detect" features are written. You must be online on the network to use the Google Translate API.
Hardware and Software Requirements
LabVIEW 2018 or higher
Python 2.7 or 3.6 with the same bitness as LabVIEW.
Google Translate API for Python.
Steps to Implement or Execute Code
1. At the command prompt, install googletrans via pip or conda.
pip install googletrans
conda install -c conda-forge googletrans
2. Open Python Node Google Translate.vi.
3. Select your Python version you installed.
4. Type a sentence into the "Text" control.
5. Set the language to the "Source Language" control. The default is "auto" to automatically detect and translate the language. If you want to choose the language you want, the language options are listed below.
6. Set the language to the "Destination Language" control.