Skip to main content
Configuration File: config/shared/currency.ts

Overview

The currency configuration controls how prices are displayed throughout your entire website:
  • Currency symbol ($, €, £, Â¥, ₹)
  • Currency code (USD, EUR, GBP, etc.)
  • Symbol position (before or after amount)
Configuration file: config/shared/currency.ts

Quick Start

1

Edit the config file

Open config/shared/currency.ts:
export const currencyConfig = {
  symbol: "$",
  code: "USD",
  position: "before",  // "$99.99"
};
2

Choose your currency

Update symbol, code, and position for your region
3

Test it

npm run dev
All prices across the site will use your currency settings

Configuration Structure

export const currencyConfig: {
  symbol: string;
  code: string;
  position: "before" | "after";
} = {
  symbol: "$",             // Currency symbol
  code: "USD",             // Currency code
  position: "before",      // "before" = $99.99, "after" = 99.99€
};

Common Currency Examples

US Dollar (USD)

export const currencyConfig = {
  symbol: "$",
  code: "USD",
  position: "before",
};
Display: $99.99

British Pound (GBP)

export const currencyConfig = {
  symbol: "£",
  code: "GBP",
  position: "before",
};
Display: £99.99

Currency Symbols Quick Reference

CurrencyCodeSymbolPositionExample
US DollarUSD$before$99.99
EuroEUR€after99.99€
British PoundGBP£before£99.99
Indian RupeeINR₹before₹99.99
Japanese YenJPY¥before¥99
Australian DollarAUD$before$99.99
Canadian DollarCAD$before$99.99
Swiss FrancCHFCHFbeforeCHF 99.99
Chinese YuanCNY¥before¥99.99
Mexican PesoMXN$before$99.99
Brazilian RealBRLR$beforeR$ 99.99
Singapore DollarSGD$before$99.99
Hong Kong DollarHKDHK$beforeHK$99.99

Troubleshooting

Symbol not displaying

  1. Check encoding: File must be UTF-8
  2. Copy symbol: Use copy-paste instead of typing
  3. Use HTML entity: Some symbols have HTML codes
  4. Font support: Ensure your font includes the symbol

Wrong position

For USD ($99.99):
position: "before"  // Correct
For EUR (99.99€):
position: "after"   // Correct

Multiple dollar signs

If you use USD, AUD, CAD (all use $), the code differentiates them:
code: "USD"  // US Dollar
code: "AUD"  // Australian Dollar
code: "CAD"  // Canadian Dollar

Prices look wrong after currency change

When changing currency, you must also:
  1. Update all price values in game configs
  2. Update pricing in VPS/dedicated/web hosting configs
  3. Recalculate based on exchange rates
  4. Update text mentions of specific prices