Vue.js - translation file to better performance

Viewed 41

Suppose I have a website and it has the option to choose a language, then all the content (text) changes, where is it better in terms of performance to store this content? I would build a translation file on the client side, is that right? (Also for sites where the content is huge)

1 Answers

Storing on the client-side all huge content translation list would be fine as long as you get this context from API and only 2 languages allowed. The client browser can handle that.

Hoverwer if you were having more than 3 languages translated texts, I would advise you to get these translated contents for each language from API.

From personal experience, We recently developed an app with 2 language options, and all the texts are on the client-side, but we face some issues on pages where we have texts more than 25 pages long. For us, it's just one page where users hardly visit. So we don't care, but if this issue were mostly for all pages, I would be using the server-side.

Related