User Currency Region SDK
Get user's local currency and region for personalized experiences.
Written By despia
Last updated About 1 year ago
Localization Benefits
This SDK helps create local experiences by:
Showing correct pricing
Using local currency
Matching regional formats
Improving user experience
Supporting global users
SDK Usage
// Get user's store location
window.despia = "getstorelocation://"
// Wait for no-code tools
setTimeout(() => {
console.log("Store Location:", storeLocation)
}, 100)
Examples
Price Localization
window.despia = "getstorelocation://"
setTimeout(() => {
showPrice({
region: storeLocation,
amount: 9.99
})
}, 100)
Regional Content
window.despia = "getstorelocation://"
setTimeout(() => {
setupStore({
location: storeLocation,
language: getLanguage()
})
}, 100)
Currency Display
window.despia = "getstorelocation://"
setTimeout(() => {
const locale = storeLocation
formatPrices(locale)
}, 100)
Tips
Add 100ms delay for no-code tools
Use for price formatting
Consider regional differences
Test multiple regions
Handle all currencies
Important for No-Code Tools
Tools like WeWeb or Toddle require a 100ms delay before reading the storeLocation value.
Need help? Email us at support@despia.com