DeepL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 4.2, Creation date: 2018-07-28, Last change: 2025-08-18

just opens the browser with the DeepL translation tool



See Also: SGgrabcad

Example Illustration

 missing image of DeepL

Syntax

DeepL

Examples

Just try: DeepL



Copyright 2018-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth

Algorithm (Workflow)

The function DeepL is designed to open a web browser and navigate to the DeepL translation tool with a specified text to be translated. It is part of the SolidGeometry library and was introduced in version 4.2.

Input Parameters

Algorithm Steps

  1. The function retrieves the input parameters using getfuncparams, which processes the input arguments.
  2. It replaces German umlauts in the input text with their corresponding English representations (e.g., 'ä' to 'ae').
  3. The text is then converted to a URL-encoded format using the helper function str2urlhex.
  4. A base URL for the DeepL translator is defined: https://www.deepl.com/translator#en/de/.
  5. The function concatenates the base URL with the URL-encoded text and opens it in the default web browser using the web function.

Helper Function: str2urlhex

This function converts a string into a URL-encoded format by replacing characters with their hexadecimal ASCII values prefixed by '%'.

Parameters

Process

  1. Initialize a counter i to iterate over the string.
  2. For each character in the string, if its ASCII value is less than or equal to 32, convert it to its hexadecimal representation.
  3. Replace the character in the string with its URL-encoded form.
Algorithm explaination created using ChatGPT on 2025-08-18 23:57. (Please note: No guarantee for the correctness of this explanation)

Last html export of this page out of FM database by TL: 2025-09-21