Skip to content

Commit c93e5e0

Browse files
authored
Fix for server translations not working properly (#34)
# Description Fixes an issue with server translations not working properly ## Type of change Please mark relevant options with an `x` in the brackets. - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update - [ ] Algorithm update - updates algorithm documentation/questions/answers etc. - [ ] Other (please describe): # How Has This Been Tested? Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration - [ ] Integration tests - [ ] Unit tests - [ ] Manual tests - [ ] No tests required # Reviewer checklist Mark everything that needs to be checked before merging the PR. - [ ] Check if the UI is working as expected and is satisfactory - [ ] Check if the code is well documented - [ ] Check if the behavior is what is expected - [ ] Check if the code is well tested - [ ] Check if the code is readable and well formatted - [ ] Additional checks (document below if any) # Screenshots (if appropriate): # Questions (if appropriate):
1 parent 0ab6d2e commit c93e5e0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

app/localization/i18n.server.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import { resolve } from "node:path"
21
import { RemixI18Next } from "remix-i18next/server"
32
import i18n from "~/localization/i18n" // your i18n configuration file
3+
import { resources } from "./resource"
44

55
const i18next = new RemixI18Next({
66
detection: {
@@ -11,9 +11,7 @@ const i18next = new RemixI18Next({
1111
// when translating messages server-side only
1212
i18next: {
1313
...i18n,
14-
backend: {
15-
loadPath: resolve("./public/locales/{{lng}}/{{ns}}.json"),
16-
},
14+
resources,
1715
},
1816
})
1917

0 commit comments

Comments
 (0)