diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/i18n.js | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/lib/i18n.js b/src/lib/i18n.js index 4cbb9a5d..79d179d5 100644 --- a/src/lib/i18n.js +++ b/src/lib/i18n.js @@ -3,15 +3,12 @@ import { register, init, getLocaleFromNavigator } from 'svelte-i18n'; // The list of locales to look for const localeCodes = ['en', 'fr']; -// The directory where locale files are stored -const localeDirectory = "../locales"; - // the default locale to use if none was found const defaultLocale = "en"; // Adds a new locale based on its code function addLocale(localeCode) { - register(localeCode, () => import(`${localeDirectory}/${localeCode}.json`)); + register(localeCode, () => import(`../locales/${localeCode}.json`)); } // Picks the default locale based on navigator locale and the list of available locales |
