Refactored localization files.

This commit is contained in:
Mike Cao 2022-03-18 19:17:23 -07:00
parent 7c2b687350
commit f24696de5a
124 changed files with 18 additions and 18 deletions

View file

@ -1,7 +1,7 @@
import { useState, useEffect } from 'react';
import { useRouter } from 'next/router';
import { get } from 'lib/web';
import enUS from 'public/language/en-US.json';
import enUS from 'public/intl/language/en-US.json';
const languageNames = {
'en-US': enUS,
@ -12,7 +12,7 @@ export default function useLanguageNames(locale) {
const { basePath } = useRouter();
async function loadData(locale) {
const { ok, data } = await get(`${basePath}/language/${locale}.json`);
const { ok, data } = await get(`${basePath}/intl/language/${locale}.json`);
if (ok) {
languageNames[locale] = data;