From e83e84e2789f027f17382de5b60daf3e614cb92b Mon Sep 17 00:00:00 2001 From: Zakher Masri <46135573+zaaakher@users.noreply.github.com> Date: Fri, 3 May 2024 04:53:21 +0300 Subject: [PATCH] [feat]: i18n contribution to include mention of `dayjsLocales` (#2444) * [feat]: update i18n contribution docs * [feat]: include `dayjsLocale` reference in README.md * Revert "[feat]: include `dayjsLocale` reference in README.md" This reverts commit b599558b29b68f01036204b90722c3193d201df2. * chore: fix locales/readme conflict --- interface/locales/README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/interface/locales/README.md b/interface/locales/README.md index 91038dbe6..fa4a0e9be 100644 --- a/interface/locales/README.md +++ b/interface/locales/README.md @@ -16,6 +16,18 @@ export const LANGUAGE_OPTIONS = [ // The rest of the languages ]; ``` +Finally, add the new language code to the `dayjsLocales` object in `interface/locales/index.ts`. list of dayjs locales can be found [here](https://cdn.jsdelivr.net/npm/dayjs@1/locale.json) + +```ts +const dayjsLocales: Record = { + // Add the new language code and import statement here + // Example: + // es: () => import('dayjs/locale/es.js'), + en: () => import('dayjs/locale/en.js'), + de: () => import('dayjs/locale/de.js'), + // The rest of the languages +}; +``` ## Syncing locales