mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 14:17:13 +01:00
Refactored localization files.
This commit is contained in:
parent
7c2b687350
commit
f24696de5a
124 changed files with 18 additions and 18 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue