Merged in fix/my-pages-menu-not-translated (pull request #2045)
fix: my pages menu not translated * fix: my pages menu not translated fix: able to pass lang to getIntl() Approved-by: Michael Zetterberg
This commit is contained in:
@@ -16,8 +16,8 @@ export async function getMessages(lang: Lang): Promise<Record<string, string>> {
|
||||
return (await import(`./dictionaries/${lang}.json`)).default
|
||||
}
|
||||
|
||||
export async function getIntl() {
|
||||
const lang = getLang()
|
||||
export async function getIntl(options?: { lang: Lang | undefined }) {
|
||||
const lang = options?.lang || getLang()
|
||||
|
||||
if (!instances[lang]) {
|
||||
const messages = await getMessages(lang)
|
||||
|
||||
Reference in New Issue
Block a user