Skip to content

Key Naming

Format

Keys use dot notation with the pattern: section.descriptive_name

actions.add_to_cart
errors.generic
nav.home
status.in_stock

Rules

  1. Lowercase only — no camelCase, no UPPERCASE
  2. Dots separate sections — max 2 levels deep (section.key)
  3. Underscores for multi-wordadd_to_cart, not addToCart or add-to-cart
  4. Namespace is the filenamecommon.json contains keys for the common namespace
  5. Descriptive over short — prefer empty.no_results over empty.nr

Sections per namespace

common.json

SectionPurposeExamples
actionsButtons and interactive controlsadd_to_cart, save, cancel
emptyEmpty state messagescart, wishlist, no_results
errorsError messagesgeneric, not_found, offline
labelsForm labels and descriptorsemail, password, quantity
navNavigation itemshome, cart, account
statusStatus indicatorsin_stock, out_of_stock

commerce.json

SectionPurpose
cartCart items, totals, empty states
checkoutCheckout steps and confirmations
shippingShipping methods and estimates
paymentPayment methods and processing
ordersOrder status and history

account.json

SectionPurpose
authLogin, register, password reset
profileProfile fields and settings
addressesAddress management

legal.json

SectionPurpose
cookiesCookie consent banner
privacyPrivacy policy references
termsTerms & 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"
}