Translate SaaS Pricing Pages with SiteLocaleAI – Step‑by‑Step
Going global is no longer a multi‑month engineering effort. With SiteLocaleAI you can translate your pricing page, localize the numbers, and deliver a fully indexed, SEO‑friendly version to every market—all from a single JavaScript library and a tiny CLI.
1. Prerequisites
- A SaaS landing page built with any framework (React, Vue, plain HTML, WordPress, Shopify, etc.).
- An LLM API key (Claude, GPT‑4o‑mini, etc.) – SiteLocaleAI never stores your keys.
- Node ≥ 14 for the CLI (optional for static pre‑rendering).
Tip: Keep your API key in an environment variable (
SITELOCALEAI_API_KEY) to avoid committing it to source control.
2. Install the library
SiteLocaleAI is a single‑file script that works everywhere. Add it to the <head> of your page or via a bundler.
<!-- CDN version – no build step required -->
<script src="https://cdn.sitelocaleai.com/v1/sitelocaleai.min.js"></script>
If you prefer npm:
npm i @sitelocaleai/core
3. Initialise the translator
Create a small bootstrap script that tells SiteLocaleAI which languages to generate, which LLM to call, and how to round prices.
<script>
// Pull the key from your environment at runtime (e.g., via a server‑side template)
const apiKey = '{{ process.env.SITELOCALEAI_API_KEY }}';
const locale = new SiteLocaleAI({
apiKey, // your LLM API key
model: 'gpt-4o-mini', // any compatible model
targetLanguages: ['es', 'de', 'fr', 'ja'], // languages you support
priceConfig: {
currency: 'USD', // base currency of your prices
rounding: 'psychological' // 9.99 → 9.95, 19.99 → 19.95, etc.
}
});
// Translate the whole page once it loads
locale.translatePage();
</script>
The translatePage() method walks the DOM, sends each translatable node to the LLM with context (including the original price), and injects the translated text in‑place. Because the library is framework‑agnostic, it works with React’s server‑side rendering, Vue’s hydration, or WordPress templates without any extra code.
4. Localise prices with psychological rounding
Price localisation is more than currency conversion. SiteLocaleAI applies a psychological rounding algorithm that keeps the price attractive in each market.
// Example price object you might store in a JSON file
const pricing = {
plan: 'Pro',
priceUSD: 49.99
};
// The library will automatically convert and round when translating
locale.formatPrice(pricing.priceUSD, 'EUR'); // → "€42.95"
The rounding rules are:
- USD → EUR: round to the nearest 0.05.
- USD → JPY: round to the nearest 10.
- USD → GBP: round to the nearest 0.99.
You can override the defaults in the priceConfig object if your market research suggests a different strategy.
5. Pre‑render for SEO (CLI)
Search engines still struggle with client‑side translation. SiteLocaleAI ships a CLI that pre‑renders translated pages at build time, so crawlers receive fully translated HTML.
# Install the CLI globally (or use npx)
npm i -g @sitelocaleai/cli
# Run the pre‑render command
sitelocaleai prerender \
--src ./public/index.html \
--out ./dist \
--langs es,de,fr,ja \
--api-key $SITELOCALEAI_API_KEY \
--model gpt-4o-mini
The CLI creates a folder structure like:
/dist
/en index.html
/es index.html
/de index.html
/fr index.html
/ja index.html
Each file contains the translated content and the correctly rounded prices, ready for Google, Bing, and Baidu to index.
6. WordPress plugin (no Node.js needed)
If your pricing page lives on WordPress, install the SiteLocaleAI plugin from the WordPress marketplace. After activation:
1. Add your LLM API key in the plugin settings.
2. Choose target languages and price rounding mode.
3. Insert the shortcode [sitelocaleai] where you want the translated block to appear.
The plugin internally loads the same JS library, so you get identical results without writing a single line of JavaScript.
7. Test and iterate
- Open the page in a browser with the language set to one of your targets.
- Verify that the price values are rounded as expected.
- Use Google Search Console’s URL Inspection tool on the pre‑rendered
/es/URL to confirm that the HTML contains the translated text.
If you need to tweak the tone, add a system prompt in the initialization:
const locale = new SiteLocaleAI({
apiKey,
model: 'gpt-4o-mini',
systemPrompt: 'Translate SaaS copy into friendly, professional Spanish, keeping the brand voice consistent.',
targetLanguages: ['es'],
priceConfig: { currency: 'USD', rounding: 'psychological' }
});
8. Wrap‑up
With just a few lines of code you have:
- Instant, context‑aware translation of every UI string.
- Accurate, psychologically rounded prices for each currency.
- SEO‑ready, pre‑rendered pages that rank in local search results.
- Zero vendor lock‑in – you keep control of the LLM provider.
Ready to launch your SaaS globally?
9. Next steps
- Read the full reference in the SiteLocaleAI Docs.
- Explore advanced features like dynamic content translation for dashboards.
- Upgrade to the Growth plan ($99) for higher API quotas and priority support.
Try SiteLocaleAI today and watch your international conversions soar!