Skip to content

muzabol2/translator

Repository files navigation

translator

Translator is a small frontend application for the LibreTranslate API made from youtube tutorial for educational purposes only.

image

Technologies

Setup

To use LibreTranslate API you need to pay but you can run it locally and then it is free. Here is a config line that you can change. To run the api locally you need to download an image libretranslate/libretranslate and run it in a docker container. Do that:

  1. Make sure you have Docker installed on your machine.
  2. In a docker-compose.yml file of the project choose languages you want to have:
version: "3"
services:
  translator:
    image: libretranslate/libretranslate
    restart: always
    ports:
      - 3001:5000
    environment:
      LT_LOAD_ONLY: "zh,de,pl,en,es" // here change
  1. In a terminal navigate to the root directory of your project where the docker-compose.yml file is located and run the command:
docker-compose up
  1. Once the container is up and running, your frontend translate app can communicate with it. You can check if api works by opening your web browser and navigating to http://localhost:3001.

Inspiration

Jacek Pudysz - this repo is just a result of watching his tutorial on YouTube. I just added a few little changes myself. The course helped me a lot to organize my knowledge. I also caught some good practices. Thank you. You are the best!