> For the complete documentation index, see [llms.txt](https://docs.peakcommerce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.peakcommerce.com/product/using-peakcommerce/market-profiles/automatic-detection-of-user-location-currency.md).

# Auto-Detecting Currency, Language & Profile

Market Locale rules detect a visitor's locale and automatically apply the right **currency**, **language**, and **profile** — so customers get a localized experience without choosing anything, while keeping the freedom to switch currency at checkout.

## How detection works

PeakCommerce combines two signals when a shopper loads a public page or journey:

* **Browser language** — the visitor's `navigator.language` (for example `en-GB`).
* **Geo-IP location** — the visitor's country, inferred from their IP address, mapped to a suggested locale.

If the browser and geo languages agree, the browser locale is used; otherwise the geo-based suggestion wins. The detected locale is then matched against your active rules to resolve the currency, language, and profile to apply.

## Add a locale rule

Go to **Commerce → Market Locales** and click **Add Locale Rule**. Each rule has:

* **Name** — a label for the rule (e.g. "United Kingdom").
* **Locale Pattern** — one or more locales it matches. Pick exact locales (`en-GB`) or wildcards (`en-*`, "All English") to cover every region for a language.
* **Currency** — the currency to apply and format prices in.
* **Language** — the content language to apply.
* **Profile** *(optional)* — the profile to apply for that market.
* **Priority** — higher-priority rules are evaluated first.
* **Default Locale** — the fallback used when no pattern matches (only one allowed).
* **Active** — whether the rule is live.

## How rules are applied

* The detected locale is matched against active rules; the best match wins.
* If nothing matches, your **Default Locale** applies. With no rules at all, PeakCommerce falls back to USD / English.
* Shoppers can **override** the currency at checkout, and the choice is remembered on their device for future visits.

## Gotchas

* Geo-IP is approximate — VPNs or proxies can skew detection; the currency override is the shopper's escape hatch.
* You can't delete the default rule while it's set as default — assign a new default first.
* Layer a broad wildcard rule (a language) with specific country overrides at higher priority to avoid duplicating configuration.

See [Products & bundles](/product/using-peakcommerce/products-and-bundles/products-overview.md) for localized pricing and [E-commerce & payment pages](/product/using-peakcommerce/ecommerce-and-payment-pages.md) for where shoppers see and override currency.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.peakcommerce.com/product/using-peakcommerce/market-profiles/automatic-detection-of-user-location-currency.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
