Keys use dot notation with the pattern: section.descriptive_name
Rules
- Lowercase only — no camelCase, no UPPERCASE
- Dots separate sections — max 2 levels deep (section.key)
- Underscores for multi-word —
add_to_cart, not addToCart or add-to-cart
- Namespace is the filename —
common.json contains keys for the common namespace
- Descriptive over short — prefer
empty.no_results over empty.nr
Sections per namespace
common.json
| Section | Purpose | Examples |
|---|
actions | Buttons and interactive controls | add_to_cart, save, cancel |
empty | Empty state messages | cart, wishlist, no_results |
errors | Error messages | generic, not_found, offline |
labels | Form labels and descriptors | email, password, quantity |
nav | Navigation items | home, cart, account |
status | Status indicators | in_stock, out_of_stock |
commerce.json
| Section | Purpose |
|---|
cart | Cart items, totals, empty states |
checkout | Checkout steps and confirmations |
shipping | Shipping methods and estimates |
payment | Payment methods and processing |
orders | Order status and history |
account.json
| Section | Purpose |
|---|
auth | Login, register, password reset |
profile | Profile fields and settings |
addresses | Address management |
legal.json
| Section | Purpose |
|---|
cookies | Cookie consent banner |
privacy | Privacy policy references |
terms | Terms & conditions references |
Placeholders
Use {name} syntax. Placeholder names should be descriptive:
"empty.no_results": "No results found for \"{query}\"",
"cart.items_count": "You have {count} items in your cart"