Scaling Multilingual Sites for 20+ Clients with SiteLocaleAI
Managing translation, price localization, and SEO for a portfolio of client websites can quickly become a logistical nightmare. SiteLocaleAI solves this by offering a self‑hosted, framework‑agnostic JavaScript library that works with any stack—React, Vue, WordPress, Shopify, you even static HTML. Pair that with volume licensing and a CLI for SEO pre‑rendering, and you have a repeatable workflow that scales with your agency’s growth.
1. Why a Self‑Hosted Solution Makes Sense for Agencies
- Control over LLM costs – Each client can plug in their own API key (Claude, GPT‑4o‑mini, etc.), keeping usage transparent and billable per project.
- Data privacy – No third‑party service sees the raw HTML of your client sites.
- Unlimited customization – Adjust rounding rules, add brand‑specific glossaries, or inject custom meta tags without waiting for a vendor update.
These benefits line up perfectly with an agency’s need to differentiate services while keeping overhead low.
2. Setting Up a Centralized Repo
Create a monorepo that holds the shared site-locale library and a per‑client configuration folder.
# 1️⃣ Initialise the repo
mkdir agency-site-locale && cd agency-site-locale
git init
# 2️⃣ Add SiteLocaleAI as a submodule (or npm package)
npm i @sitelocaleai/core
# 3️⃣ Scaffold client configs
mkdir clients && cd clients
for client in clientA clientB clientC; do
mkdir $client && cp ../../template-config.json $client/config.json
done
Each config.json contains the client’s LLM API key, target languages, and price rounding rules. Example for a European fashion retailer:
{
"apiKey": "sk-xxxx",
"model": "gpt-4o-mini",
"languages": ["de", "fr", "es"],
"currency": "EUR",
"rounding": "psychological",
"priceMap": {"USD": 1.10}
}
3. Drop‑In JavaScript – One Line per Site
Add the library to any site, no matter the framework. The snippet below works for a plain HTML page, a React component, or a WordPress theme.
<script type="module">
import { initLocale } from "https://cdn.jsdelivr.net/npm/@sitelocaleai/core@latest";
// Load client‑specific config at runtime (e.g., via a JSON endpoint)
fetch('/locale-config.json')
.then(r => r.json())
.then(config => initLocale(config))
.catch(err => console.error('Locale init failed', err));
</script>
What it does:
1. Detects the visitor’s language.
2. Calls the configured LLM to translate visible text.
3. Replaces price numbers using the psychological rounding algorithm (e.g., $9.99 → €8.99).
Because the library runs entirely in the browser, you don’t need a Node server for each client—just a static host.
4. Volume Licensing – One Contract, Many Sites
SiteLocaleAI offers a volume‑licensing tier that fits agencies perfectly. Purchase a single license for up to 30 sites and receive:
- Unlimited API‑key usage per site (you still pay the LLM provider).
- Central dashboard to monitor token consumption across all clients.
- Priority support and custom SLA.
When you sign up, you receive a license key that you add to each client’s config.json:
{
"licenseKey": "VOL-2026-AGENCY-001",
"apiKey": "sk-xxxx",
...
}
The library validates the license on load, preventing accidental over‑use.
5. SEO Pre‑Rendering with the CLI
Search engines cannot execute JavaScript reliably for every language variant. SiteLocaleAI’s CLI solves this by pre‑rendering static HTML for each target language, which you can then serve to crawlers.
# Install the CLI globally
npm i -g @sitelocaleai/cli
# Pre‑render a site for German and French
sitelocale-cli render \
--src ./public \
--out ./dist \
--config ./clients/clientA/config.json \
--langs de,fr
The command generates index.de.html and index.fr.html. Deploy them alongside the default index.html. In your server config (NGINX, Apache, or Vercel), serve the language‑specific file based on the Accept‑Language header.
Example NGINX snippet:
location / {
set $lang $http_accept_language;
if ($lang ~* "de") { rewrite ^/$ /index.de.html break; }
if ($lang ~* "fr") { rewrite ^/$ /index.fr.html break; }
try_files $uri $uri/ /index.html;
}
Now Google and Bing index the fully translated pages, giving each client a multilingual SEO boost without extra runtime cost.
6. WordPress Integration – No Node Required
Many of your clients may be on WordPress. The official SiteLocaleAI WordPress plugin drops the same library into the theme’s functions.php automatically.
- Upload the plugin ZIP via Plugins → Add New → Upload.
- Activate it and go to Settings → SiteLocaleAI.
- Paste the client’s
config.json(or just the API key and languages).
The plugin injects the script tag for you, and the pre‑rendering CLI can be run from a simple WP‑CLI command:
wp site_locale render --lang=es --output=public/es.html
No Node.js environment is needed on the hosting server.
7. Monitoring & Reporting
Use the central dashboard to track:
- Tokens per client – helps you bill the client for LLM usage.
- Page load impact – the library lazy‑loads translations after the initial paint, keeping CLS low.
- SEO index health – integrated with Google Search Console to verify that each language version is being crawled.
Link to the dashboard documentation for deeper insights: SiteLocaleAI Docs – Dashboard.
8. Quick Checklist for Agency Roll‑Out
| ✅ | Item |
|---|---|
| 1 | Create a monorepo with shared library and per‑client configs |
| 2 | Obtain a volume‑license key from SiteLocaleAI |
| 3 | Add the drop‑in script or WordPress plugin to each site |
| 4 | Run the CLI pre‑render for all target languages |
| 5 | Deploy language‑specific HTML and configure server redirects |
| 6 | Set up the dashboard to monitor token usage |
| 7 | Provide each client with a usage report and SEO performance metrics |
9. Ready to Scale?
By centralizing translation, price localization, and SEO pre‑rendering, you can serve 20+ client sites with a single, maintainable workflow. The combination of a self‑hosted JS library, volume licensing, and a powerful CLI gives you the speed of a SaaS product while retaining full control.
Try SiteLocaleAI today and give your agency the multilingual edge it deserves!