Skip to content

Conversation

MatteoGauthier
Copy link

@MatteoGauthier MatteoGauthier commented May 11, 2025

Hey! I noticed there are only English translations, so I added some localized wording files in the docs.

Users just have to copy and paste the localization object of their choice.

@daveycodez
Copy link
Contributor

How did you get these translations? Are these just AI translated?

@daveycodez
Copy link
Contributor

I was thinking of at some point allowing the AuthUIProvider to just accept a "locale" prop and set the translations automatically, and bundle a ton of major language localizations with the package

@MatteoGauthier
Copy link
Author

@daveycodez Yes these are AI translations FTM

I was thinking of at some point allowing the AuthUIProvider to just accept a "locale" prop and set the translations automatically, and bundle a ton of major language localizations with the package

Nice idea, in order to bundle size small, maybe it can be exported in a treeshake ready way, not just all in one

@daveycodez
Copy link
Contributor

daveycodez commented May 13, 2025

How much are localization strings really adding to the Bundle 🤔 just a bunch of strings I can’t imagine it’s that heavy? I’ll be doing some bundle analyzation soon across the board.

Anyway which AI did these come from? GPT? Maybe it’d be better to have a script that creates these files in the beforePublish script, so any localization strings automatically get translated. And then we can just provide an array of language codes to that script.

My concern with this as is is that it will be missing new strings and needs to be manually managed. An automatic system on before publish would be perfect. And just use Open AI key from .env to do it. At least until the locale prop is supported natively

@daveycodez
Copy link
Contributor

The other thing is I'm working on a new Error Pages PR and it's going to change all of the localization keys from camel case to all caps snake case to match Better Auth error codes format, so these would need to be updated to match those as well when that's ready. An automatic generation script on build would definitely be ideal

@tanosugi tanosugi mentioned this pull request May 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants