A smart banner that says "Get our app" in English does not work for Japanese visitors browsing your site. Localization goes beyond translation: it includes the right app store link (Apple vs. Google, regional store variations), the right language for the CTA, the right layout direction (LTR vs. RTL), and culturally appropriate messaging. A properly localized banner can increase conversion rates by 30-50% compared to a generic English-only banner shown to non-English audiences.
This guide covers how to localize smart banners for global audiences. For banner CTA optimization, see banner CTAs that convert. For the complete smart banners setup, see the smart banners guide.
The live banner preview showing how the banner appears on a mobile device.
What to Localize
Banner Copy
The most obvious element. Translate:
- Message text: The main banner message.
- CTA button text: "Get the App" in the user's language.
- Subtext: Benefit descriptions, ratings text.
const bannerTranslations = {
en: {
message: "Get the app for a better experience",
cta: "Open in App",
subtext: "4.8 stars, 50K+ reviews",
},
es: {
message: "Obtiene la app para una mejor experiencia",
cta: "Abrir en la App",
subtext: "4.8 estrellas, 50K+ reseñas",
},
ja: {
message: "アプリでより快適に",
cta: "アプリで開く",
subtext: "4.8 星, 50K+ レビュー",
},
ar: {
message: "احصل على التطبيق لتجربة أفضل",
cta: "فتح في التطبيق",
subtext: "4.8 نجوم, +50 ألف مراجعة",
},
};
App Store Links
Different regions may have different App Store URLs. The Play Store is generally universal, but the Apple App Store has region-specific URLs:
function getStoreUrl(platform, locale) {
if (platform === 'ios') {
// Apple App Store URLs are the same globally, but the store
// region is determined by the user's Apple ID
return 'https://apps.apple.com/app/yourapp/id123456789';
}
if (platform === 'android') {
// Play Store URLs are universal
return 'https://play.google.com/store/apps/details?id=com.example.app';
}
// For markets without Google Play (China), use alternative stores
if (platform === 'android' && locale.startsWith('zh')) {
return 'https://yourapp.com/download-android'; // Custom download page
}
}
China consideration: Google Play is not available in China. If you have significant Chinese traffic, provide alternative download methods (direct APK download, Huawei AppGallery, Xiaomi GetApps, etc.).
RTL Layout
For Arabic, Hebrew, and other RTL languages, the banner layout needs to be mirrored:
.smart-banner[dir="rtl"] {
direction: rtl;
text-align: right;
}
.smart-banner[dir="rtl"] .smart-banner__content {
flex-direction: row-reverse;
}
.smart-banner[dir="rtl"] .smart-banner__close {
left: 12px;
right: auto;
}
Or use logical CSS properties (preferred):
.smart-banner {
padding-inline-start: 16px;
padding-inline-end: 12px;
}
.smart-banner__close {
inset-inline-end: 12px;
}
.smart-banner__icon {
margin-inline-end: 12px;
}
Logical properties (inline-start, inline-end) automatically flip for RTL languages without needing separate RTL rules.
Star Ratings and Numbers
Number formatting varies by locale:
- English: 4.8, 50,000
- German: 4,8 (comma as decimal separator), 50.000
- Arabic: ٤٫٨ (Arabic-Indic numerals in some contexts)
Use the browser's Intl API:
function formatRating(rating, locale) {
return new Intl.NumberFormat(locale, {
minimumFractionDigits: 1,
maximumFractionDigits: 1,
}).format(rating);
}
function formatCount(count, locale) {
return new Intl.NumberFormat(locale, {
notation: 'compact',
compactDisplay: 'short',
}).format(count);
}
Currency (for Promotional Banners)
If your banner includes a price or discount:
function formatDiscount(amount, currency, locale) {
return new Intl.NumberFormat(locale, {
style: 'currency',
currency: currency,
}).format(amount);
}
// "20% off" → "20 % de descuento" (Spanish) → "20%オフ" (Japanese)
Detecting the User's Language
Browser Language
The simplest approach: use the browser's language preference:
function getUserLanguage() {
// navigator.language returns the user's preferred language
// e.g., "en-US", "ja", "ar-SA", "zh-CN"
return navigator.language || navigator.userLanguage || 'en';
}
function getLocale() {
const lang = getUserLanguage();
const base = lang.split('-')[0]; // "en-US" → "en"
// Check if we have translations for this language
if (bannerTranslations[lang]) return lang;
if (bannerTranslations[base]) return base;
return 'en'; // Fallback
}
Page Language
If your website already detects and serves localized content, match the banner language to the page:
function getPageLanguage() {
return document.documentElement.lang || 'en';
}
This ensures the banner language matches the rest of the page, which feels more natural than a banner in a different language.
GeoIP
For region-specific app store links or regional promotions, use GeoIP detection:
// Server-side: determine user's country from IP
function getCountryFromIP(req) {
// Using a GeoIP service or header from CDN
return req.headers['cf-ipcountry'] || // Cloudflare
req.headers['x-country-code'] || // Custom
'US'; // Default
}
CTA Localization Patterns
Keep CTAs Short
CTAs must be concise in every language. Some languages are more verbose:
| English | Spanish | German | Japanese |
|---|---|---|---|
| "Open" (4 chars) | "Abrir" (5) | "Öffnen" (6) | "開く" (2) |
| "Get the App" (11) | "Obtener la App" (15) | "App herunterladen" (18) | "アプリを入手" (6) |
| "Install" (7) | "Instalar" (8) | "Installieren" (13) | "インストール" (6) |
German CTAs are often longer than English. Ensure your button can accommodate the longest translation:
.smart-banner__cta {
white-space: nowrap;
min-width: fit-content;
padding: 10px 16px; /* Generous padding for longer text */
}
Do Not Machine-Translate CTAs
CTA copy requires native-level understanding of what sounds natural and compelling. "Download Now" machine-translated to Japanese might be grammatically correct but feel unnatural. Use professional translation or localized copywriting for CTAs.
Testing Localized Banners
Browser Language Override
Test different languages by changing your browser's language preference:
- Chrome:
chrome://settings/languages - Firefox:
about:preferences#general> Language - Safari: System Preferences > Language & Region
Force Locale in Development
// Development only: force a specific locale
const DEBUG_LOCALE = new URLSearchParams(window.location.search).get('locale');
const locale = DEBUG_LOCALE || getPageLanguage();
Visit yoursite.com?locale=ar to test the Arabic banner.
Checklist
For each localized banner, verify:
- Text fits within the banner without overflow or truncation
- CTA button is large enough for the translated text
- RTL layout works correctly (for Arabic, Hebrew)
- Numbers and currencies are formatted correctly
- App store links are correct for the region
- Star ratings display correctly
- Dismiss button is accessible and correctly positioned
Tolinku Localized Banners
Tolinku's smart banners support multi-language configuration. Set banner translations per language in the Tolinku dashboard, and the SDK automatically serves the correct language based on the page locale or browser language. RTL layouts are handled automatically for supported languages.
For CTA optimization across languages, see banner CTAs that convert. For the complete setup, see the smart banners guide.
Get deep linking tips in your inbox
One email per week. No spam.