In the database, I store information in a languages
table.
When the admin wants to add a new transport option that needs translation, I retrieve the languages from the database. The admin then fills out the form once for each language available in the database.
A friend suggested using Vuex store to fetch and save the languages upon app launch. This way, when the admin switches to adding clothes (which also require translations), the app doesn't need to make repeated calls to display the form for each language.
However, what happens if another admin adds a new language while one admin is spending time on a page with 3 saved languages? When they switch pages to add clothes, will the newly added language be included?
The proposal of keeping all language-related operations within the Vuex store seems convenient as it eliminates the need for continuous database calls and centralizes code handling language management.
But how does Vuex ensure that admins can see all available languages, especially in scenarios where additions are made during their session?