Meridian handbook
ReferenceConfiguration

locales.yaml and strings

Every key of config/locales.yaml (the install's locales with their time zone, currency, fallbacks, direction, calendar and sorting) and of config/strings/<locale>.yaml.

config/locales.yaml declares every locale the install knows. Each site enables its own subset in its site.yaml. config/strings/<locale>.yaml holds the template string catalogue of one locale.

locales:
  available:
    - code: en-GB
      label: English
      source: true
      default: true
      timezone: Europe/London
      currency: GBP
    - code: fr-FR
      label: Français
      fallback: [en-GB]

engine-dmo dev locale add declares a locale with its id and enables it on a site. See Sites, locales and routes and Localisation.

locales.yaml

KeyTypeDefaultMeaning
localesobjectThe install’s locales and locale groups
locales.availablelist of objectsRequiredEvery locale any site may enable, in order
locales.available[].calendarbuddhist, chinese, coptic, dangi, ethioaa, ethiopic, gregory, hebrew, indian, islamic, islamic-civil, islamic-rgsa, islamic-tbla, islamic-umalqura, iso8601, japanese, persian, rocDerived from the regionThe CLDR calendar dates are shown in
locales.available[].codestringRequiredThe BCP 47 tag, such as en-GB, fr-FR or zh-Hans. It is the locale’s handle in URLs, hreflang and every other file
locales.available[].collationstringDerived from the tagThe ICU collation text is sorted with
locales.available[].currencystringThe source locale’sAn ISO 4217 currency code, such as GBP
locales.available[].defaultbooleanfalseThe install’s default locale
locales.available[].derived_fromstringAnother locale this one derives from. Must name a known locale
locales.available[].directionltr, rtlDerived from the scriptltr or rtl
locales.available[].fallbacklist of string[]Locales whose text shows, in order, where this one has none
locales.available[].first_day_of_weekintegerDerived from the region1 (Monday) to 7 (Sunday)
locales.available[].fold_diacriticsbooleantrueSearch treats é as e
locales.available[].hour_cycleh11, h12, h23, h24Derived from the regionh23 or h12 (also h11, h24)
locales.available[].idstringWritten for youThe element’s stable id. Written by engine-dmo check --fix; never write or change it by hand
locales.available[].labelstringThe name shown to staff and in a locale switcher, in its own language
locales.available[].machine_translationassist, forbidassist allows AI translation drafts for this locale; forbid never offers them
locales.available[].numberingstringDerived from the localeThe CLDR numbering system, such as latn or arab
locales.available[].slugsnative, transliterateDerived from the scripttransliterate makes Latin-script slugs from other scripts; native keeps the script
locales.available[].sourcebooleanfalseThe locale content is written in first. Exactly one; it must declare timezone and currency
locales.available[].statutorybooleanfalseA locale the law requires: publishing reports any statutory locale still waiting for its text
locales.available[].timezonestringThe source locale’sAn IANA time zone, such as Europe/London
locales.available[].translatorsstringWho translates this locale, shown in engine-dmo locale list
locales.groupslist of objects[]Sets of locales that share values of fields translated per group
locales.groups[].idstringWritten for youThe element’s stable id. Written by engine-dmo check --fix; never write or change it by hand
locales.groups[].keystringRequiredThe group’s key
locales.groups[].localeslist of stringRequiredThe locale codes in the group

strings/<locale>.yaml

KeyTypeDefaultMeaning
stringsmap{}The locale’s template strings by key, nested maps allowed, read in templates with the translation function. A key missing in a locale falls back along the locale’s fallbacks