# Converting

The Code Conversion Tool offers automated conversion of algorithms from one language to another while preserving the source code's structure, variables and comments. The feature performs an analysis on the source code and then builds a translation model to convert it into the target language.

### Step 1 :

Log in with Google Authentication in Kodezi.

<figure><img src="https://1546495129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuCUGeAGoLnKn0XrQ3cCn%2Fuploads%2FdTYQfAmfu4j93MWL6Okq%2FStep%2003%20(1).png?alt=media&#x26;token=e5c4f5b8-4dff-4e3c-9225-ecb84b56026f" alt=""><figcaption></figcaption></figure>

### Step 2 :

After signing in successfully, click on the Translating button.

<figure><img src="https://1546495129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuCUGeAGoLnKn0XrQ3cCn%2Fuploads%2F3ZuyEvQNGRlTvSyDKPao%2FFrame%2055945.png?alt=media&#x26;token=76bde0d6-e468-4ed9-80ad-5121745ad25c" alt=""><figcaption></figcaption></figure>

### Step 3 :

Inside the Translating UI, the first language box represents the current language, which is fixed and cannot be changed. The second language box allows you to choose the language into which you wish to translate the current program. Then click the Translating button.

<figure><img src="https://1546495129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuCUGeAGoLnKn0XrQ3cCn%2Fuploads%2FT7JqJFm29VwDICvFfaPm%2FFrame%2055946.png?alt=media&#x26;token=0d8c077d-5282-4c2f-b494-0732a68eb46a" alt=""><figcaption></figcaption></figure>

{% hint style="warning" %}
Kodezi does not support extremely large sections of code, so you may have to select a block of code for converting if guided to do so.
{% endhint %}

### Step 4 :

After clicking on the Translating button, the translation process will start.

<figure><img src="https://1546495129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuCUGeAGoLnKn0XrQ3cCn%2Fuploads%2FXUj6Hp86KX4RN6BobTYi%2Fts3.png?alt=media&#x26;token=3c0c535f-a364-4b72-a9fc-1590c11813be" alt=""><figcaption></figcaption></figure>

### Step 5 :

You will see results similar to these in your IDE once the translating process is finished.

<figure><img src="https://1546495129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FuCUGeAGoLnKn0XrQ3cCn%2Fuploads%2FjcHItbtqhrJPoSFp9Exs%2FGenerate%20Documentation%20Select%20Type%20(3).png?alt=media&#x26;token=6a858ef8-f3e1-4e8f-879d-252e7119377f" alt=""><figcaption></figcaption></figure>

### Step 6 :

Now you can click on the Generate button to create a separate folder, "Translate Code" and save the file with the name "Translate" and the current time in the same workspace as the original code.

### Tips

Our model is trained on numerous languages and will try to convert from one language to another efficiently but the main constraint is the language itself. An object-oriented language can't be converted to a markup language (e.g. JavaScript to HTML). Also, some languages are very rich in built-in functions (e.g. Python), so when converting to other languages the functions will be needed to be swapped.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kodezi.com/feature-guides/converting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
