Localization i18n
Is there a recommendation on how to apply localization / i18n ?
I would need this also for auth and validations, i am wondering if anyone has a similiar scenario and maybe has some example code to share.
6 Replies
Hi @kovs-game. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
I apologize, but the provided knowledge sources do not contain specific information about localization (i18n) in Wasp, including for authentication and validations. There are no recommendations or example code provided for implementing localization in Wasp applications based on the given documents.
To get accurate and up-to-date information on this topic, I would suggest:
1. Checking the official Wasp documentation for any recent updates on localization support.
2. Asking about localization in the Wasp community forums or Discord channel, where other developers might share their experiences or solutions.
3. Contacting the Wasp development team directly for guidance on best practices for implementing localization in Wasp applications.
If localization is a critical feature for your project, you may need to implement a custom solution using standard React and Node.js internationalization libraries alongside Wasp, but this would require further research beyond the information provided in the given knowledge sources.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------
Sorry @kovs-game, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist:
Perhaps try again in 15mins?
We are looking to support this in the future, comment on the issue here to add more info on what you are looking to achieve 🙂 https://github.com/wasp-lang/wasp/issues/2061
In terms of adding i18n to your Wasp app - I'd say, anything that's used in the React ecosystem will work for you. Something like: https://react.i18next.com/getting-started
You are not able to internationalise Auth UI, unfortunately - but this is also something we will do in the future: https://github.com/wasp-lang/wasp/issues/1104
ok, so in theory i can use another auth library and get away with the auth localization ?
i am wondering if i can integrate better-auth for example, and then not use wasp built-in authentication.
it seems that i wont be able to use context.user from wasp i will need to create a middleware for restricting pages instead of defining required auth.
Wohooo @kovs-game, you just became a Waspeteer level 1!
Yep, auth is pretty much coupled with Wasp... you are able to write your own UI for the auth and just use Wasp's auth hooks e.g. check the source for the Auth UI forms 🙂
sounds good, i will check the sources and maybe use Cursor.AI to do this for me :boi: