

Sorry, I didn’t think to add in the post that the translations are in fact of user generated content, and are themselves provided by users.
Project Fluent is still a good resource tho, thank you.
And also yeah, I’ll use a better schema for language tags, that’s a clear fault
Using an ID instead of the text content itself as part of the PK should be a no-brainer. Languages evolve over time, and translations change. PKs should not.
I still don’t get why having a separate table for languages is useful. I mean, even if the translation changes, the language itself will remain the same, right?
Oh, right. Taking into account language variants makes VERY obvious why I’d want to use a table to store them.
people tend to believe that translating is enough to localize. It is not.
Onestly, I just hope that won’t be something i should have to worry about. The rest of the codebase is as shitty as it gets, and I don’t want to be the one to refactor it for proper localization. I’m implementing a new feature that allows me some degree of movement to think about a good design for that, and new, features, but this is as far as I’ll go (Yes I know I probably sound like an ass but it really is that bad)
I mean for now it’s not being requested to add other languages beside italian and english, and i’m pretty sure my employer will never care about languages he doesn’t speak, so chances of languages that require some work other than translations are basically null.