Skip to content

Localized currency with profile override#162

Draft
red-one1 wants to merge 1 commit intohdkiller:masterfrom
red-one1:localised-currency
Draft

Localized currency with profile override#162
red-one1 wants to merge 1 commit intohdkiller:masterfrom
red-one1:localised-currency

Conversation

@red-one1
Copy link
Contributor

@red-one1 red-one1 commented Feb 8, 2026

Benefits

  • Shows pricing in a region-appropriate currency, improving clarity and conversion for non-USD users.
  • Lets users override currency explicitly, which avoids confusing locale heuristics.
  • Refreshes FX rates on app restart without requiring API keys.

Architecture

  • A server-side rates cache pulls USD-based rates from Frankfurter on startup (Nitro plugin) and exposes them via an internal API.
  • The client loads rates once on boot and stores them in memory for formatting.
  • Currency resolution order is: profile country -> profile timezone -> browser timezone -> browser language. A profile override short-circuits all heuristics.
  • Pricing formatters read from a shared currency utility with fallback static rates if the refresh fails.

Code Changes

Notes

  • If Frankfurter is down, the app falls back to static rates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant