Skip to content

Commit 740a501

Browse files
committed
fix(i18n): update loadPath to support GitHub Pages deployment
1 parent b0f393c commit 740a501

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/i18n.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ i18n
6565
backend: {
6666
// Path to load translation files
6767
// {{lng}} = language code, {{ns}} = namespace
68-
loadPath: '/locales/{{lng}}/{{ns}}.json',
68+
// Use BASE_URL to support GitHub Pages deployment with subpath
69+
loadPath: `${import.meta.env.BASE_URL}locales/{{lng}}/{{ns}}.json`,
6970
},
7071

7172
// Language detection configuration

0 commit comments

Comments
 (0)