Tutorial

Scale Multilingual Sites: Agency Volume Licensing Guide

Published March 19, 2026

Scale Multilingual Sites: Agency Volume Licensing Guide

Managing 20+ client websites across different markets can feel like juggling flaming swords. With SiteLocaleAI’s self‑hosted JavaScript library you can turn that chaos into a repeatable, low‑cost workflow. This tutorial walks an agency through:

  1. Setting up a volume‑licensing configuration
  2. Integrating the drop‑in JS library across any framework (React, Vue, WordPress, Shopify, etc.)
  3. Automating price localization with psychological rounding
  4. Running the SEO pre‑rendering CLI so search engines index fully translated pages
  5. Deploying the WordPress plugin without a Node.js build step

1. Prepare a Central License Repository

SiteLocaleAI lets you store API keys for the LLMs you use (Claude, GPT‑4o‑mini, etc.) in a JSON file that each client site can reference. This keeps keys out of the public repo and lets you rotate them centrally.

// licenses.json – kept on a private server or a secured S3 bucket
{
  "default": {
    "provider": "openai",
    "model": "gpt-4o-mini",
    "apiKey": "sk-XXXXXXXXXXXXXXXXXXXX"
  },
  "clientA": {
    "provider": "anthropic",
    "model": "claude-3-5-sonnet",
    "apiKey": "sk-ant-XXXXXXXXXXXXXXXX"
  },
  "clientB": {
    "provider": "openai",
    "model": "gpt-4o-mini",
    "apiKey": "sk-YYYYYYYYYYYY"
  }
}

Tip: Use a tiny Node script to fetch the right credentials based on a domain name:

// getLicense.js – run on your CI/CD pipeline
const fetch = require('node-fetch');
const fs = require('fs');

async function getLicense(domain) {
  const res = await fetch('https://my‑secure‑bucket/licenses.json');
  const all = await res.json();
  const key = domain.includes('clienta') ? 'clientA' : domain.includes('clientb') ? 'clientB' : 'default';
  return all[key];
}

module.exports = getLicense;

When you build each client site, inject the returned object into the HTML as a script tag (or via a server‑side template) so the browser can read the LLM credentials without exposing them publicly.


2. Drop‑in JS Library – One‑Line Integration

SiteLocaleAI works with any front‑end stack. The only requirement is that the page loads the library after the DOM is ready.

<!-- index.html (common for all clients) -->
<script src="https://cdn.sitelocaleai.com/v1/site-locale.min.js"></script>
<script>
  // Pull the license data injected by your build step
  const license = window.__SITE_LOCALE_LICENSE__;

  SiteLocaleAI.init({
    provider: license.provider,
    model: license.model,
    apiKey: license.apiKey,
    // Optional: enable price rounding per currency
    priceRounding: true,
    // Optional: enable SEO pre‑rendering mode
    seoMode: true
  });
</script>

Framework‑agnostic note: In React you can place the same snippet inside public/index.html. In Vue, add it to public/index.html or use a global mixin. For Shopify, drop the script into the theme’s theme.liquid head section.


3. Price Localization with Psychological Rounding

SiteLocaleAI’s priceRounding option automatically converts a base price (e.g., USD) into the visitor’s currency and applies psychological rounding (e.g., €9.99 → €9.95). This is done client‑side, so you don’t need a separate backend service.

// Example: a product component
function ProductCard({priceUSD}) {
  const price = SiteLocaleAI.formatPrice(priceUSD, {currency: 'EUR'});
  return `<div class="price">${price}</div>`;
}

The library also respects locale‑specific number formatting (comma vs. period) and can be customized via the formatPrice options.


4. SEO Pre‑Rendering CLI – One Command for All Sites

Search engines can’t execute JavaScript on every request, so we pre‑render translated pages at build time. The CLI reads a list of URLs, fetches the translations via the LLM API, and writes static HTML files.

# Install the CLI globally (once per agency server)
npm i -g @sitelocaleai/cli

# Create a config file for the whole portfolio
cat > seo-config.json <<EOF
{
  "sites": [
    {
      "domain": "clienta.example.com",
      "paths": ["/", "/about", "/products"]
    },
    {
      "domain": "clientb.example.com",
      "paths": ["/", "/contact"]
    }
  ],
  "licenseFile": "https://my-secure-bucket/licenses.json",
  "outputDir": "./preRendered"
}
EOF

# Run the pre‑rendering
site-locale-cli render --config seo-config.json

The CLI will:
- Pull the appropriate LLM key for each domain
- Generate translated HTML for every path
- Write the files to ./preRendered/<domain>/ which you can then serve via a CDN or static host

Internal docs link: For more CLI flags, see the official guide: https://sitelocaleai.com/docs/cli.


5. WordPress Plugin – No Node.js Required

Many of your clients run on WordPress. The SiteLocaleAI plugin ships as a zip file that you upload via the admin dashboard. After activation, you only need to paste the license JSON URL in the settings page.

  1. Dashboard → Plugins → Add New → Upload Plugin → select site-locale-plugin.zip
  2. Activate the plugin.
  3. In Settings → SiteLocaleAI paste https://my-secure-bucket/licenses.json.
  4. Enable Price Rounding and SEO Mode if desired.

The plugin automatically injects the script tag and adds a shortcode [site_locale_translate] you can place anywhere to force a language switch button.


6. Automating the Whole Workflow

Tie everything together with a simple CI pipeline (GitHub Actions, GitLab CI, or Jenkins). Below is a minimal GitHub Actions workflow that runs for each client repository:

name: Build & Deploy Multilingual Site
on:
  push:
    branches: [main]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - name: Install dependencies
        run: npm ci
      - name: Inject license
        env:
          DOMAIN: ${{ secrets.CLIENT_DOMAIN }}
        run: |
          node scripts/getLicense.js $DOMAIN > public/license.json
      - name: Build site
        run: npm run build
      - name: SEO pre‑render
        run: |
          npm i -g @sitelocaleai/cli
          site-locale-cli render --config seo-config.json
      - name: Deploy to CDN
        uses: some/cdn-deploy-action@v1
        with:
          path: ./preRendered/${{ secrets.CLIENT_DOMAIN }}

With this pipeline you get one‑click deployments for every client, all while keeping LLM keys secure and leveraging volume licensing discounts.


7. Volume Licensing Benefits

When you sign up for the $49 Starter or $99 Growth plans, SiteLocaleAI automatically applies a 10 % discount for every additional domain beyond the first ten. The Enterprise tier unlocks custom pricing and dedicated support, which is ideal for agencies handling 50+ sites.


8. Wrap‑Up & Next Steps

You now have a repeatable process:
- Centralized license management
- One‑line JS integration for any framework
- Automatic price rounding
- SEO‑ready static pages via the CLI
- WordPress support without Node.js

Start by creating a licenses.json file, add the script tag to a test site, and run the CLI on a handful of URLs. Once satisfied, roll the same pattern out to all 20+ client domains.


Ready to boost your agency’s multilingual workflow?

Visit SiteLocaleAI.com, pick the plan that fits your portfolio, and start translating at scale today!