feat(KAN-16): add English localization foundation
This commit is contained in:
+10
-1
@@ -4,6 +4,8 @@ import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
|
||||
import type { DefineComponent } from 'vue';
|
||||
import { createSSRApp, h } from 'vue';
|
||||
import { renderToString } from 'vue/server-renderer';
|
||||
import { createLocalization } from '@/lib/localization';
|
||||
import type { LocalizationSettings } from '@/types/localization';
|
||||
|
||||
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
|
||||
|
||||
@@ -19,7 +21,14 @@ createServer(
|
||||
import.meta.glob<DefineComponent>('./pages/**/*.vue'),
|
||||
),
|
||||
setup: ({ App, props, plugin }) =>
|
||||
createSSRApp({ render: () => h(App, props) }).use(plugin),
|
||||
createSSRApp({ render: () => h(App, props) })
|
||||
.use(plugin)
|
||||
.use(
|
||||
createLocalization(
|
||||
props.initialPage.props
|
||||
.localization as LocalizationSettings,
|
||||
),
|
||||
),
|
||||
}),
|
||||
{ cluster: true },
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user