The first time I got to localization.
Found a couple of libraries, but wondered - why are they?
For example, create an object:
var languages = { ru:{ menu:"Меню", addfav:"Добавить в избранное", removefav:"Убрать из избранного", choice:"Выбор" }, en:{ menu:"Menu", addfav:"Add to favorites", removefav:"Remove from favorites", choice:"Choice" } }; And in the text I will take lines from another object, in which I will update the fields according to the language.
What's my mistake?