Localizing Prices for Japan with SiteLocaleAI
Expanding an e‑commerce store into Japan can be a game‑changer, but it comes with unique challenges: language translation, cultural nuances, and price presentation that feels natural to Japanese shoppers. SiteLocaleAI makes this painless with a drop‑in JavaScript library, self‑hosted LLM integration, and a built‑in price localization engine that applies psychological rounding (also known as charm pricing) per currency.
1. Install the Library – One Script Tag, No Framework Lock‑In
SiteLocaleAI works with any front‑end stack—React, Vue, WordPress, Shopify, or plain HTML. Add the following script tag just before the closing </body> tag:
<script src="https://cdn.sitelocaleai.com/v1/sitelocaleai.min.js"></script>
<script>
// Initialize with your LLM API key (Claude, GPT‑4o‑mini, etc.)
SiteLocaleAI.init({
apiKey: 'YOUR_LLM_API_KEY',
defaultLang: 'en',
targetLang: 'ja',
// Enable price localization
priceLocalization: true,
// Currency mapping – you can add more if needed
currencyMap: {
USD: 'JPY'
}
});
</script>
That’s it—no Node.js, no build step. The library will automatically translate any element with the data-sitelocale attribute and replace price values according to the rules you set.
2. Markup Your Prices for Automatic Localization
Wrap every price you want to convert in a span with data-sitelocale-price. Include the original currency and amount as data attributes:
<span data-sitelocale-price data-currency="USD" data-amount="49.99">$49.99</span>
When the page loads, SiteLocaleAI will:
1. Call your LLM to translate surrounding text (product titles, descriptions, CTA buttons).
2. Convert $49.99 to Japanese yen using the latest exchange rate.
3. Apply charm rounding (e.g., ¥5,480 → ¥5,499) to make the price feel more attractive.
3. Understanding Charm Rounding for JPY
Japanese consumers are accustomed to prices ending in 9 or 99. SiteLocaleAI’s rounding engine can be configured per currency. The default for JPY is:
// In your init config (optional override)
SiteLocaleAI.setRoundingRule('JPY', {
// Round to the nearest 100 yen, then subtract 1 yen
base: 100,
offset: -1
});
So a raw conversion of $49.99 (≈ ¥5,480) becomes ¥5,479, which is displayed as ¥5,479. The library also respects psychological price thresholds (e.g., ¥10,000 → ¥9,999) to keep the price perception low.
4. Pre‑Render SEO‑Friendly Pages with the CLI
Search engines still struggle with client‑side translations. SiteLocaleAI ships a CLI that crawls your site, renders translated pages, and writes static HTML files for each locale. Run it once after you’ve added the library:
npx sitelocaleai prerender \
--source ./public \
--output ./public/ja \
--lang ja \
--api-key $YOUR_LLM_API_KEY
The CLI will:
- Fetch every page under ./public.
- Translate all data-sitelocale elements.
- Localize all prices using the rounding rules.
- Save the fully rendered Japanese HTML under ./public/ja.
Deploy the ja folder to your CDN or static host, and Google will index the Japanese content directly, boosting international SEO.
5. WordPress Integration (No Node Required)
If your store runs on WordPress, install the SiteLocaleAI plugin from the WordPress repository. The plugin:
- Adds a settings page for your LLM API key.
- Automatically injects the JS library.
- Scans posts and product pages for price spans and converts them.
- Provides a “Generate SEO Pages” button that runs the same prerender logic on the server.
You can still use the same data-sitelocale-price markup inside the Gutenberg editor or classic editor.
6. Full Example – Product Card
<div class="product-card">
<h2 data-sitelocale="title">Premium Leather Wallet</h2>
<p data-sitelocale="description">
Hand‑stitched with full‑grain leather, perfect for everyday use.
</p>
<span class="price" data-sitelocale-price data-currency="USD" data-amount="79.00">$79.00</span>
<button data-sitelocale="cta">Add to Cart</button>
</div>
After SiteLocaleAI runs, a Japanese visitor sees:
- Title & description translated into Japanese.
- Price displayed as
¥8,799(rounded from ¥8,800). - CTA button reading
カートに追加.
7. Testing Locally
During development, you can force a locale by appending ?lang=ja to the URL. The library will swap content on‑the‑fly without a full page reload:
// In the console
SiteLocaleAI.setLocale('ja');
Use the browser’s network tab to verify that price conversion calls are made to your LLM endpoint and that the exchange rate is fetched only once per session.
8. Monitoring & Analytics
SiteLocaleAI emits events you can hook into for analytics:
SiteLocaleAI.on('priceLocalized', (data) => {
console.log('Price converted:', data);
// Send to Google Analytics, Mixpanel, etc.
});
Track conversion rates per locale and adjust your rounding rules if you notice price‑sensitivity patterns.
9. Pricing for Your Business
SiteLocaleAI offers a self‑hosted model, so you only pay for the library and your LLM usage. Choose a plan that matches your traffic:
- $5 Indie – up to 5,000 pageviews/month.
- $49 Starter – up to 50,000 pageviews/month.
- $99 Growth – up to 200,000 pageviews/month.
- $249 Enterprise – unlimited pageviews + premium support.
All plans include the CLI, WordPress plugin, and unlimited language pairs.
10. Next Steps
- Sign up for a SiteLocaleAI account and grab your LLM API key.
- Add the script tag to your e‑commerce templates.
- Mark up every price with
data-sitelocale-price. - Run the prerender CLI to generate Japanese static pages.
- Deploy and watch your international traffic grow!
Ready to go global? Try SiteLocaleAI today and watch your Japanese sales soar.