From 662a93c6e05549d9ff2c176fc62126069b384aa0 Mon Sep 17 00:00:00 2001 From: Deyan Nenov Date: Mon, 12 Feb 2024 17:33:41 +0000 Subject: [PATCH] Update README.md --- README.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 31ff708..08cd851 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,20 @@ The project has sufficient assets to cover the base-case implementation during d npm run build/bundle - +## Localization +Localization is done via `react-intl` library. The current setup relies on the combination of these 2 elements: +- localization files stored inside the `\src\locales\` folder (add as many localization files as needed) +- adding new locales to the switch statement inside the `localization.js` file: +``` +export const getMessagesForLocale = (locale) => { + switch(locale) { + case 'en': + return englishMessages; + default: + return englishMessages; + } +}; +``` ## 3rd party libraries and dependencies The use of 3rd party libraries was kept to the bare minimum, where developing native elements would have resulted in exceptional time overhead.