User Tools

Site Tools


en:autotranslation

This is an old revision of the document!


How to translate Wiki

The original Wiki version is written in the English language and the Czech version is the result of the automatic translation using Open AI.

Steps to translate wiki

1. Install Python

There is lot of tutorials about how to install the Python, try to find one - it's not difficult.

2. Get access to Wiki folder

On Arkhalia server there is a folder with the main PHP webpage:

/var/www/html/

It contains subfolder where the Wiki is installed (unpacked):

/var/www/html/wiki

You need the “sh” user access to make changes in that folder (ask Shadow).

3. Locate the wiki pages folders

All the pages written in Wiki are placed in this folder:

/var/www/html/wiki/data/pages
/var/www/html/wiki/data/pages/cs
/var/www/html/wiki/data/pages/en
/var/www/html/wiki/data/pages/cs_old

You can see that it contains everything which is visible in the “site-map”.

4. Backup the old "cs" folder

Rename the old “cs” article folder:

mv -R /var/www/html/wiki/data/pages/cs /var/www/html/wiki/data/pages/cs_old2

5. Configure the Script - The Api key

The Python script for translation is present here:

Arkhalia translation Python script

As you can see, it contains the Configuration which we need to change:

CHATGPT_API_KEY = ""

First we need to put there the Open API key, for which we need to register on:

openai.com/api/

We have to add there billing method, or you can write me (Jurass17) and I will provide mine. One translation of the Wiki cost approx. <1 dollar.

6. Configure the Script - The input and output folder

As you can see in script:

INPUT_DIRECTORY_ABSOLUTE = "/Users/jiri/projekty/my_python_scripts/arkhalia_translate/en"
OUTPUT_DIRECTORY_ABSOLUTE = "/Users/jiri/projekty/my_python_scripts/arkhalia_translate/cs"

This paths shall be pointing directly to the folders where the input “en” directory and the output “cs” directory (where all the articles will be translated are present)

en/autotranslation.1749196314.txt.gz · Last modified: 2025/06/06 07:51 by juras17