Answer the question
In order to leave comments, you need to log in
How to make multilingual notifications?
Made one site
He is on vuejs, and made it into several languages (ru/en). Now there are just 2 files ru.js and en.js. All system texts that are on the site are built into them and, depending on the selected language, one of the files is connected.
I want to fasten notifications.
1) How to actually make them and take into account viewing? (in terms of the database structure)
there are users USERS(user_id) and notifications NOTIFICATIONS(not_id)
If I don't know how much notification will be in the future (many/few) how to store everything in these cases?
- create a separate user_notif(user_id, notif_id) and, when a new notification is issued, add a notification to this table for each user, and delete it after reading
- on the contrary, only after reading, write to this table and then do some kind of NOT IN
Which of these will be more correct and more optimized?
2) How to make them multilingual? Just add several columns for languages (when replenishing languages, immediately add columns)? Or is it better to add new files to the site itself?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question