Easily shop verified, supported, and secure Partner and Alteryx built Add-Ons on Marketplace.
LEARN MOREIf you need to translate your text from one language to another, the process can be quite painful. The current Google Translate tool requires an API key, and billing information to get started. I thought it would be great to have a tool you can download, and not have to worry about where to get an API key or have credit card information at the ready.
This tool uses a free to use Python library called deep_translator (https://pypi.org/project/deep-translator/) that also uses Google translate to translate text. However, it avoids the need for billing information or any setup. Just download the tool, hit save, and translate away!
On a first time setup, you may need to right click and open Alteryx Designer as Administrator, in order to install the Python libraries required to use the tool. Following this, you will not need to run as Administrator to use the tool.
Let me know below if there are any suggestions, or found bugs within this tool.
Nice icon cant wait to try out !
Thanks @IraWatt
Let me know what you think 😁
Thanks TheOC for making this tool. I downloaded it and open it as admin but the workflow seems stuck at formula tool before python tool. What gives?
hey @kevinlin001
Have you saved it as a macro and using it within a workflow?
Are you able to screenshot the issue you are having?
Cheers,
TheOC
Hey,
Thanks for this tool! I am attempting to use it on alot of data - not sure if I downloaded the tools improperly but it wont load past 45%. Idk if it takes a while or I am missing something to finish the workflow. Any advice or suggestion would be greatly appreciated!
hey @rcarmody
can you give me some insight into how much data you have? I'll give it a test on mine.
does it work on 1 row of data at a time/a smaller subset of the data?
@TheOC
Can you walk me through how to properly download the python library and then use it within a workflow? Because I think the issue is with that library. Thanks!
hey @rcarmody
Ofcourse!
1. Open Alteryx as Administrator:
2. Open my tool:
3) Hit file, save as, save into your macro folder (it should open by default).
4) Open your workflow with text you want to translate:
5) Find my tool that you have just saved, in the 'Bulien Tools' section of your tool pallete:
6) Drag the tool onto your canvas:
7) Specify the language you want to translate to, and your field. In this case, i want to translate to Spanish:
8) Hit run, inspect the results:
You should see a new field called 'translated', which has your translated text.
Hope this helps, let me know if you have any issues.
I'd recommend starting with a sample dataset like this so you can test it works on one, before rolling it out to a larger dataset. However - i did test this on larger datasets before publishing, so i would be surprised if it doesn't work.
Cheers,
TheOC
I am loving this tool, @TheOC - so many applications.
Hi, I run the tool and I'm receiving 2 errors:
Error: Google Auto Translate (25): Tool #1: ---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
<ipython-input-1-9766019d1444> in <module>
3 from ayx import Package
4 #Package.installPackages(['pandas','numpy'])
----> 5 Package.installPackages('deep_translator')
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\Package.py in installPackages(package, install_type, debug)
200 print(pip_install_result["msg"])
201 if not pip_install_result["success"]:
--> 202 raise pip_install_result["err"]
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\Utils.py in runSubprocess(args_list, debug)
118
119 try:
--> 120 result = subprocess.check_output(args_list, stderr=subprocess.STDOUT)
121 if debug:
122 print("[Subprocess success!]")
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\subprocess.py in check_output(timeout, *popenargs, **kwargs)
409 kwargs['input'] = '' if kwargs.get('universal_newlines', False) else b''
410
--> 411 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
412 **kwargs).stdout
413
c:\program files\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
510 retcode = process.poll()
511 if check and retcode:
--> 512 raise CalledProcessError(retcode, process.args,
513 output=stdout, stderr=stderr)
514 return CompletedProcess(process.args, retcode, stdout, stderr)
CalledProcessError: Command '['c:\\program files\\alteryx\\bin\\miniconda3\\envs\\designerbasetools_venv\\python.exe', '-I', '-m', 'pip', 'install', 'deep_translator']' returned non-zero exit status 1.
Error: Google Auto Translate (25): Tool #1: ---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-ce1a2a642a82> in <module>
1 from ayx import Alteryx
----> 2 from deep_translator import GoogleTranslator
3 translated = GoogleTranslator(source='auto', target='de').translate("keep it up!")
4
5 data = Alteryx.read("#1")
ModuleNotFoundError: No module named 'deep_translator'
Thanks for the help!
Hi @TheOC ,
Excited to use this, however I have the same issue as @Gabrielaguevaraacon. Using pip list on the command line shoes deep-_translator 1.8.3 is installed, using Designer 2022.1.1.25127.
Cheers!
Hi @TheOC ,
I tried again following all the steps you gave above, but the workflow just showing running forever... Any idea what might cause it? Thanks so much!
Kevin
Hi @TheOC ,
I was able to download the macro & get the "Field to Translate" text box to preview my text to be translated, however, I am receiving the following error message. Any idea what may be causing this?
Appreciate any help you may provide.
Thank you,
Zach
"
Error: Google Auto Translate (4): Tool #1: ---------------------------------------------------------------------------SSLCertVerificationError Traceback (most recent call last)c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\urllib3\connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 669 # Make the request on the httplib connection object.--> 670 httplib_response = self._make_request( 671 conn,c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\urllib3\connectionpool.py in _make_request(self, conn, method, url, timeout, chunked, **httplib_request_kw) 380 try:--> 381 self._validate_conn(conn) 382 except (SocketTimeout, BaseSSLError) as e:c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\urllib3\connectionpool.py in _validate_conn(self, conn) 977 if not getattr(conn, "sock", None): # AppEngine might not have `.sock`--> 978 conn.connect() 979 c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\urllib3\connection.py in connect(self) 361 --> 362 self.sock = ssl_wrap_socket( 363 sock=conn,c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\urllib3\util\ssl_.py in ssl_wrap_socket(sock, keyfile, certfile, cert_reqs, ca_certs, server_hostname, ssl_version, ciphers, ssl_context, ca_cert_dir, key_password, ca_cert_data) 383 if HAS_SNI and server_hostname is not None:--> 384 return context.wrap_socket(sock, server_hostname=server_hostname) 385 c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\ssl.py in wrap_socket(self, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, session) 499 # ctx._wrap_socket()--> 500 return self.sslsocket_class._create( 501 sock=sock,c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\ssl.py in _create(cls, sock, server_side, do_handshake_on_connect, suppress_ragged_eofs, server_hostname, context, session) 1039 raise ValueError("do_handshake_on_connect should not be specified for non-blocking sockets")-> 1040 self.do_handshake() 1041 except (OSError, ValueError):c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\ssl.py in do_handshake(self, block) 1308 self.settimeout(None)-> 1309 self._sslobj.do_handshake() 1310 finally:SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)During handling of the above exception, another exception occurred:MaxRetryError Traceback (most recent call last)c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\requests\adapters.py in send(self, request, stream, timeout, verify, cert, proxies) 488 if not chunked:--> 489 resp = conn.urlopen( 490 method=request.method,c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\urllib3\connectionpool.py in urlopen(self, method, url, body, headers, retries, redirect, assert_same_host, timeout, pool_timeout, release_conn, chunked, body_pos, **response_kw) 725 --> 726 retries = retries.increment( 727 method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\urllib3\util\retry.py in increment(self, method, url, response, error, _pool, _stacktrace) 438 if new_retry.is_exhausted():--> 439 raise MaxRetryError(_pool, url, error or ResponseError(cause)) 440 MaxRetryError: HTTPSConnectionPool(host='translate.google.com', port=443): Max retries exceeded with url: /m?tl=de&sl=auto&q=keep+it+up%21 (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1123)')))During handling of the above exception, another exception occurred:SSLError Traceback (most recent call last)<ipython-input-2-ce1a2a642a82> in <module> 1 from ayx import Alteryx 2 from deep_translator import GoogleTranslator----> 3 translated = GoogleTranslator(source='auto', target='de').translate("keep it up!") 4 5 data = Alteryx.read("#1")c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\deep_translator\google.py in translate(self, text, **kwargs) 63 self._url_params[self.payload_key] = text 64 ---> 65 response = requests.get( 66 self._base_url, params=self._url_params, proxies=self.proxies 67 )c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\requests\api.py in get(url, params, **kwargs) 71 """ 72 ---> 73 return request("get", url, params=params, **kwargs) 74 75 c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\requests\api.py in request(method, url, **kwargs) 57 # cases, and look like a memory leak in others. 58 with sessions.Session() as session:---> 59 return session.request(method=method, url=url, **kwargs) 60 61 c:\users\zjohnson\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\requests\sessions.py in request(self, method, url, params, data, headers, cookies, files, auth, timeout, allow_redirects, proxies, hooks, stream, verify, cert, json) 585 "
Hello @TheOC , I followed the process you had documented here, But when I click save as, it does not open the macro folder by default, it asked me to browse the folder so i saved the file at C:\Users\<username>\AppData\Local\Alteryx\Settings\AddOnData\Macros. Is that the correct location?
Additionally, I dont have Bulien Tools section on my tool pane and neither can i find any information on it. Can you help me understand?
Hi,
Can you please let me know how can i get the bulien palette inside my alteryx? is there a link to download?
Thanks,
Sri
In the knowledge base article below, see the Shared Macros in Alteryx Designer section to learn how to create a My Macros folder so that the macros show up in the tool bar.
Instructions from the article without the screen shots:
Click the plus sign (+) to add a macro repository
Click the three dots icon to browse to the location where you save macros on your computer or a network or paste the file path to the network share containing the macros
Hi,
I got this error:
" Google Auto Translate (1) Tool #1: Failed to find virtual env named: "designerbasetools_venv""
How can I fix it?
Hi @TheOC ,
Im getting below error
Error: Google Auto Translate (1): Tool #1: ---------------------------------------------------------------------------
CalledProcessError Traceback (most recent call last)
<ipython-input-1-9766019d1444> in <module>
3 from ayx import Package
4 #Package.installPackages(['pandas','numpy'])
----> 5 Package.installPackages('deep_translator')
c:\users\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\Package.py in installPackages(package, install_type, debug)
200 print(pip_install_result["msg"])
201 if not pip_install_result["success"]:
--> 202 raise pip_install_result["err"]
c:\users\\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\site-packages\ayx\Utils.py in runSubprocess(args_list, debug)
118
119 try:
--> 120 result = subprocess.check_output(args_list, stderr=subprocess.STDOUT)
121 if debug:
122 print("[Subprocess success!]")
c:\users\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\subprocess.py in check_output(timeout, *popenargs, **kwargs)
413 kwargs['input'] = empty
414
--> 415 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
416 **kwargs).stdout
417
c:\users\appdata\local\alteryx\bin\miniconda3\envs\designerbasetools_venv\lib\subprocess.py in run(input, capture_output, timeout, check, *popenargs, **kwargs)
514 retcode = process.poll()
515 if check and retcode:
--> 516 raise CalledProcessError(retcode, process.args,
517 output=stdout, stderr=stderr)
518 return CompletedProcess(process.args, retcode, stdout, stderr)
CalledProcessError: Command '['c:\\users\\\appdata\\local\\alteryx\\bin\\miniconda3\\envs\\designerbasetools_venv\\python.exe', '-I', '-m', 'pip', 'install', 'deep_translator']' returned non-zero exit status 1.
Error: Google Auto Translate (1): Tool #1: ---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-2-ce1a2a642a82> in <module>
1 from ayx import Alteryx
----> 2 from deep_translator import GoogleTranslator
3 translated = GoogleTranslator(source='auto', target='de').translate("keep it up!")
4
5 data = Alteryx.read("#1")
ModuleNotFoundError: No module named 'deep_translator'