#172 i18n. Set language preferences in session or in User model
11/06/2024
Gratis
🚫 The official Rails Guides do not recommend to store locale in session/cookie.
Let's break the rules! 😈
In this episode:
- not logged in users store language preferences in the Session.
- logged in users store language preferences in User model.
This way our routes will stay clean 🙌
0
Inicia sesión para unirte a la conversación
Destacado en listas
![#171 Internationalisation (i18n) basics. Translate your app!](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MjI5MCwicHVyIjoiYmxvYl9pZCJ9fQ==--37d7664cc7d9e164f4feb5c3b6fd96b6e1543c13/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJqcGciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--2d7cd3a4d9675c7f4c17dad7856d799792bd3595/maxresdefault.jpg)
![#172 i18n. Set language preferences in session or in User model](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MjI5MiwicHVyIjoiYmxvYl9pZCJ9fQ==--0ea8a7a8febfb04ee1284201017fa4d9cb09a6b5/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--34e5c9bac0ea93c87a890e274478a7e6bd659b29/172.png)
![#173 automate translations with AI](https://superails.com/rails/active_storage/representations/redirect/eyJfcmFpbHMiOnsiZGF0YSI6MjI5NCwicHVyIjoiYmxvYl9pZCJ9fQ==--2fce7386296773799983993368a9676b46a6bd78/eyJfcmFpbHMiOnsiZGF0YSI6eyJmb3JtYXQiOiJwbmciLCJyZXNpemVfdG9fbGltaXQiOls0MDAsNjAwXX0sInB1ciI6InZhcmlhdGlvbiJ9fQ==--34e5c9bac0ea93c87a890e274478a7e6bd659b29/173.png)
+1
i18n (internationalization)