forked from abner/for-legacy-web
Add i18n, use default imports for UI.
This commit is contained in:
14
src/context/Locale.tsx
Normal file
14
src/context/Locale.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { IntlProvider } from "preact-i18n";
|
||||
import definition from "../../external/lang/en.json";
|
||||
|
||||
interface Props {
|
||||
children: JSX.Element | JSX.Element[]
|
||||
}
|
||||
|
||||
export default function Locale({ children }: Props) {
|
||||
return (
|
||||
<IntlProvider definition={definition}>
|
||||
{ children }
|
||||
</IntlProvider>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user