Getting Started with SiteLocaleAI

Go from zero to a fully translated website in five steps. This guide covers sign-up, SDK deployment, JS integration, language configuration, and testing.

1

Sign Up and Get Your License Key

Create an account and register your domain.

Visit sitelocaleai.com and create an account. Once signed in, go to your dashboard and click "Add Site". Enter your domain and choose a plan.

After registration, you will receive a license key that looks like this:

Keep this key safe. You will need it when configuring the SDK.

Your license key

slai_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6

docker-compose.yml

services:
  sdk:
    image: ghcr.io/hiscore-ro/sitelocaleai-sdk
    ports:
      - "4000:4000"
    env_file:
      - .env
    depends_on:
      - db

  db:
    image: postgres:18-alpine
    environment:
      POSTGRES_DB: sitelocaleai
      POSTGRES_USER: slai
      POSTGRES_PASSWORD: your-secure-password
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:

.env

DATABASE_URL=postgres://slai:your-secure-password@db:5432/sitelocaleai
SITELOCALEAI_LICENSE_KEY=slai_live_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
LLM_API_KEY=sk-your-openai-api-key
EXCHANGE_RATE_URL=https://open.er-api.com/v6/latest
2

Deploy the SDK

Run the Node.js backend on your own infrastructure.

The SDK is a Node.js application backed by PostgreSQL. The fastest way to deploy it is with Docker Compose. Create a docker-compose.yml file:

Create an .env file with your credentials:

Start the services:

Terminal

docker compose up -d

The SDK will run database migrations automatically on first boot and start serving on port 4000.

docker-compose.yml

services:
  sdk:
    image: ghcr.io/hiscore-ro/sitelocaleai-sdk
    ports:
      - "4000:4000"
    env_file:
      - .env
    depends_on:
      - db

  db:
    image: postgres:18-alpine
    environment:
      POSTGRES_DB: sitelocaleai
      POSTGRES_USER: slai
      POSTGRES_PASSWORD: your-secure-password
    volumes:
      - pgdata:/var/lib/postgresql/data

volumes:
  pgdata:
3

Add the JS Library to Your Site

One script tag is all you need.

Add the following script tag to the <head> or just before </body> on every page you want translated:

The JS library is under 15KB gzipped. It detects the visitor's preferred language, fetches translations from your SDK, and swaps DOM text in place. No page reload required.

HTML

<!-- Add to <head> -->
<meta name="sitelocaleai:url" content="https://your-sdk.example.com">
<meta name="sitelocaleai:locales" content="en,de,fr,es,ja">
<meta name="sitelocaleai:default-locale" content="en">
<meta name="sitelocaleai:base-currency" content="USD">
<script src="https://cdn.jsdelivr.net/npm/sitelocaleai/dist/sitelocaleai.iife.js"></script>

Browser

https://your-sdk.example.com/admin
4

Configure Languages

Use the admin dashboard to manage target languages.

Open the admin dashboard at your SDK URL:

From the dashboard you can:

  • Add and remove target languages
  • Review and edit translations
  • Set translation rules (e.g. never translate brand names)
  • Monitor translation usage and LLM costs

Browser

https://your-sdk.example.com/admin
5

Test It

Visit your site and switch languages.

Open your website in a browser. You should see a language switcher widget in the bottom corner. Click it and select a different language.

The first time a page is translated, the SDK sends the text to your LLM provider. This takes 1-3 seconds. After that, translations are cached in PostgreSQL and served instantly (under 5ms).

To test with a specific locale, append a query parameter:

If everything is working, you should see your page content translated into the selected language with prices converted to the local currency.

Browser

# Test German translation
https://your-site.com?lang=de

# Test Japanese translation
https://your-site.com?lang=ja

# Test French translation
https://your-site.com?lang=fr

You are up and running!

Explore more tutorials to set up React integration, price localization, or SEO pre-rendering.