mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
feat: remote strings
This commit is contained in:
1 parent
af53713c60
commit
2e13bcfee2
2 files changed
+24
-4
No files matched your search
@@ -0,0 +1,13 @@
|
||||
import locales from '@blitzkit/i18n/locales.json';
|
||||
import type { APIRoute, GetStaticPaths } from 'astro';
|
||||
import { getStrings } from 'packages/website-ue/src/core/i18n/getStrings';
|
||||
|
||||
export const getStaticPaths: GetStaticPaths = () => {
|
||||
return locales.supported.map(({ locale }) => ({
|
||||
params: { locale },
|
||||
}));
|
||||
};
|
||||
|
||||
export const GET: APIRoute<{}, { locale: string }> = async ({ params }) => {
|
||||
return Response.json(await getStrings(params.locale));
|
||||
};
|
||||
Reference in new issue
Block a user