This is more of a conceptual question than somethi...
# orm-help
d
This is more of a conceptual question than something directly related to Prisma but I'm hoping some people here will have some thoughts on this. Right now, I'm using Prisma with Apollo Server to create the GraphQL API used by an app. Products in the database have things like
description
,
notes
, etc. Right now, those things are simply stored as (English) strings – or lists of strings in the case of
notes
– but I've recently been thinking about translations. My app has the ability to provide translations for in-app strings but everything from the database, at least right now, will be in English. I'm wondering what'd be a smart way to include translations for these things straight from the database. Just thinking out loud, maybe I could store things like
description
as
JSON
(I'm using PostgreSQL) instead of a string and then structure that by "en", "de", etc. Then, the user's locale could be passed via query parameter. Anyway, I'm kind of new to all this and learning as I go so I'd be happy to hear some suggestions. Thanks, everyone! Have a great day.
I've posted this as a GitHub Discussion as it'll probably be easier to have a conversation there. https://github.com/prisma/prisma/discussions/6084