Translate all app texts in multiple langs - JavaScript

Viewed 28

I have implemented my app in English, and I am looking for a way to cover 3 other langs.

I have thought to create a module langs.js

and then, create a map like this one:

const texts = {
   "spanish": {
        "home": {
            "header": "Hello",
            "footer": "World"
         },
         ...
    },
    ...
}

But... is that the way? Any ideas? This is my fist time doing something like this.

0 Answers
Related