-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alberto Fernandez <[email protected]>
- Loading branch information
1 parent
81e9952
commit 2c3445d
Showing
3 changed files
with
53 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,29 @@ | ||
import { getRequestConfig } from "next-intl/server"; | ||
|
||
export enum Locale { | ||
en = "en", | ||
} | ||
|
||
interface Language { | ||
tag: string; | ||
i18nKey: string; | ||
} | ||
|
||
export default getRequestConfig(async ({ locale }) => ({ | ||
messages: (await import(`../i18n/${locale}.json`)).default, | ||
})); | ||
|
||
export const locales = ["en"]; | ||
export const locales: Locale[] = Object.values(Locale); | ||
|
||
type Languages = { | ||
[Key in Locale]: Language; | ||
}; | ||
|
||
export const languages: Languages = { | ||
[Locale.en]: { | ||
i18nKey: "english", | ||
tag: Locale.en, | ||
}, | ||
}; | ||
|
||
export const defaultLocale = "en"; |