[GH-ISSUE #7969] i18n error #28279

Closed
opened 2026-04-17 19:43:15 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @CRC32EX on GitHub (Feb 14, 2026).
Original GitHub issue: https://github.com/better-auth/better-auth/issues/7969

Originally assigned to: @himself65 on GitHub.

Is this suited for github?

  • Yes, this is suited for github

To Reproduce

  1. install better-auth@1.5.0-beta.13
  2. install @better-auth/i18n@1.5.0-beta.13
  3. Write code
betterAuth({
  defaultLocale: 'ja-jp',
  plugins: [
    captcha({
      provider: 'cloudflare-turnstile',
      secretKey: '**********',
    }),
    i18n({
      translations: {
        'ja-jp': {
          VERIFICATION_FAILED: 'test-001',
          MISSING_RESPONSE: 'test-002',
          USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: 'test-003'
        }
      }
    })
  ]
})
  1. USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL works well.
    But VERIFICATION_FAILED and MISSING_RESPONSE is not working.

Current vs. Expected behavior

USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL is works well.
Image

VERIFICATION_FAILED is not working.
Image

What version of Better Auth are you using?

1.5.0-beta.13

System info

$ npx envinfo --system --npmPackages better-auth,@better-auth/i18n --binaries --browsers

  System:
    OS: Windows 11 10.0.22631
    CPU: (16) x64 AMD Ryzen 7 9800X3D 8-Core Processor
    Memory: 38.76 GB / 61.59 GB
  Binaries:
    Node: 25.2.1 - C:\Program Files\nodejs\node.EXE
    npm: 11.6.2 - C:\Program Files\nodejs\npm.CMD
  Browsers:
    Chrome: 144.0.7559.133
  npmPackages:
    @better-auth/i18n: ^1.5.0-beta.13 => 1.5.0-beta.13
    better-auth: ^1.5.0-beta.13 => 1.5.0-beta.13

Which area(s) are affected? (Select all that apply)

Package

Auth config (if applicable)

No response

Additional context

No response

Originally created by @CRC32EX on GitHub (Feb 14, 2026). Original GitHub issue: https://github.com/better-auth/better-auth/issues/7969 Originally assigned to: @himself65 on GitHub. ### Is this suited for github? - [x] Yes, this is suited for github ### To Reproduce 1. install `better-auth@1.5.0-beta.13` 2. install `@better-auth/i18n@1.5.0-beta.13` 3. Write code ```ts betterAuth({ defaultLocale: 'ja-jp', plugins: [ captcha({ provider: 'cloudflare-turnstile', secretKey: '**********', }), i18n({ translations: { 'ja-jp': { VERIFICATION_FAILED: 'test-001', MISSING_RESPONSE: 'test-002', USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL: 'test-003' } } }) ] }) ``` 4. `USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL` works well. <br>But `VERIFICATION_FAILED` and `MISSING_RESPONSE` is not working. ### Current vs. Expected behavior `USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL` is works well. <img width="544" height="143" alt="Image" src="https://github.com/user-attachments/assets/68793568-6c66-4ea5-baef-2edb9aa7cd31" /> `VERIFICATION_FAILED` is not working. <img width="527" height="98" alt="Image" src="https://github.com/user-attachments/assets/8f4264de-9ee2-4323-abc9-4576a2c2a5b9" /> ### What version of Better Auth are you using? 1.5.0-beta.13 ### System info ```bash $ npx envinfo --system --npmPackages better-auth,@better-auth/i18n --binaries --browsers System: OS: Windows 11 10.0.22631 CPU: (16) x64 AMD Ryzen 7 9800X3D 8-Core Processor Memory: 38.76 GB / 61.59 GB Binaries: Node: 25.2.1 - C:\Program Files\nodejs\node.EXE npm: 11.6.2 - C:\Program Files\nodejs\npm.CMD Browsers: Chrome: 144.0.7559.133 npmPackages: @better-auth/i18n: ^1.5.0-beta.13 => 1.5.0-beta.13 better-auth: ^1.5.0-beta.13 => 1.5.0-beta.13 ``` ### Which area(s) are affected? (Select all that apply) Package ### Auth config (if applicable) _No response_ ### Additional context _No response_
GiteaMirror added the locked label 2026-04-17 19:43:15 -05:00
Author
Owner

@CRC32EX commented on GitHub (Feb 16, 2026):

@himself65

Thank your PR #7991
But it can't resolve my problem.

code appear in response successfully.
But localized message does not exists.
Image

HELLO WORLD! is not emit to my console logs.
I think, i18n plugin is not called when CAPTCHA error scene.

Please reopen this issue.

server.ts

betterAuth({
  plugins(
  i18n({
    defaultLocale: 'en',
    detection: ['callback'],
    async getLocale() {
      console.log('HELLO WORLD!')

      return 'en'
    },
  })
})

Next.js logs

GET /ja-jp/user/sign-in 200 in 150ms (compile: 75ms, proxy.ts: 10ms, render: 65ms)
POST /api/auth/sign-in/email 400 in 10ms (compile: 7ms, render: 4ms)
<!-- gh-comment-id:3909354736 --> @CRC32EX commented on GitHub (Feb 16, 2026): @himself65 Thank your PR #7991 But it can't resolve my problem. `code` appear in response successfully. But localized message does not exists. <img width="538" height="134" alt="Image" src="https://github.com/user-attachments/assets/52644b8f-71c6-47de-9af1-1da3916f770b" /> `HELLO WORLD!` is not emit to my console logs. I think, i18n plugin is not called when CAPTCHA error scene. Please reopen this issue. <b>server.ts</b> ```typescript betterAuth({ plugins( i18n({ defaultLocale: 'en', detection: ['callback'], async getLocale() { console.log('HELLO WORLD!') return 'en' }, }) }) ``` <b>Next.js logs</b> ```txt GET /ja-jp/user/sign-in 200 in 150ms (compile: 75ms, proxy.ts: 10ms, render: 65ms) POST /api/auth/sign-in/email 400 in 10ms (compile: 7ms, render: 4ms) ```
Author
Owner

@CRC32EX commented on GitHub (Feb 23, 2026):

@himself65 @ping-maxwell @bytaesu
Please reopen this issue.

<!-- gh-comment-id:3945522834 --> @CRC32EX commented on GitHub (Feb 23, 2026): @himself65 @ping-maxwell @bytaesu Please reopen this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#28279