feat(frontend/api): i18n support
This commit is contained in:
15
src/context/LanguageContext.tsx
Normal file
15
src/context/LanguageContext.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import React, { ReactNode } from 'react';
|
||||
|
||||
export type AvailableLocales = 'en' | 'ja';
|
||||
|
||||
interface LanguageContextProps {
|
||||
locale: AvailableLocales;
|
||||
children: (locale: string) => ReactNode;
|
||||
setLocale?: React.Dispatch<React.SetStateAction<AvailableLocales>>;
|
||||
}
|
||||
|
||||
export const LanguageContext = React.createContext<
|
||||
Omit<LanguageContextProps, 'children'>
|
||||
>({
|
||||
locale: 'en',
|
||||
});
|
||||
Reference in New Issue
Block a user