> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yuvrajverma.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Currency Configuration

> Configure global currency settings for price display across your website

<Callout icon="link-horizontal" color="#2fbe1f">**Configuration File:** `config/shared/currency.ts`</Callout>

## 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

<Steps>
  <Step title="Edit the config file">
    Open `config/shared/currency.ts`:

    ```typescript theme={null}
    export const currencyConfig = {
      symbol: "$",
      code: "USD",
      position: "before",  // "$99.99"
    };
    ```
  </Step>

  <Step title="Choose your currency">
    Update symbol, code, and position for your region
  </Step>

  <Step title="Test it">
    ```bash theme={null}
    npm run dev
    ```

    All prices across the site will use your currency settings
  </Step>
</Steps>

***

## Configuration Structure

```typescript theme={null}
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

<Tabs>
  <Tab title="Before Position">
    ### US Dollar (USD)

    ```typescript theme={null}
    export const currencyConfig = {
      symbol: "$",
      code: "USD",
      position: "before",
    };
    ```

    **Display**: \$99.99

    ### British Pound (GBP)

    ```typescript theme={null}
    export const currencyConfig = {
      symbol: "£",
      code: "GBP",
      position: "before",
    };
    ```

    **Display**: £99.99
  </Tab>

  <Tab title="After Position">
    ### Euro (EUR)

    ```typescript theme={null}
    export const currencyConfig = {
      symbol: "€",
      code: "EUR",
      position: "after",
    };
    ```

    **Display**: 99.99€

    ### Swiss Franc (CHF)

    ```typescript theme={null}
    export const currencyConfig = {
      symbol: "CHF",
      code: "CHF",
      position: "after",
    };
    ```

    **Display**: 99.99 CHF
  </Tab>
</Tabs>

***

## Currency Symbols Quick Reference

| Currency          | Code | Symbol | Position | Example   |
| ----------------- | ---- | ------ | -------- | --------- |
| US Dollar         | USD  | \$     | before   | \$99.99   |
| Euro              | EUR  | €      | after    | 99.99€    |
| British Pound     | GBP  | £      | before   | £99.99    |
| Indian Rupee      | INR  | ₹      | before   | ₹99.99    |
| Japanese Yen      | JPY  | ¥      | before   | ¥99       |
| Australian Dollar | AUD  | \$     | before   | \$99.99   |
| Canadian Dollar   | CAD  | \$     | before   | \$99.99   |
| Swiss Franc       | CHF  | CHF    | before   | CHF 99.99 |
| Chinese Yuan      | CNY  | ¥      | before   | ¥99.99    |
| Mexican Peso      | MXN  | \$     | before   | \$99.99   |
| Brazilian Real    | BRL  | R\$    | before   | R\$ 99.99 |
| Singapore Dollar  | SGD  | \$     | before   | \$99.99   |
| Hong Kong Dollar  | HKD  | HK\$   | before   | HK\$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):

```typescript theme={null}
position: "before"  // Correct
```

For EUR (99.99€):

```typescript theme={null}
position: "after"   // Correct
```

### Multiple dollar signs

If you use USD, AUD, CAD (all use \$), the code differentiates them:

```typescript theme={null}
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

***
