Multilingual data modeling on MongoDB

What about this approach: product: { id: 1, name: ‘Original Name’, description: ‘Original Description’, price: 33, date: ‘2019-03-13’, translations: { es: { name: ‘Nombre Original’, description: ‘Descripción Original’, } } } If the user selects some language different to the default and the key translations exists in the object, you only need to merge it, … Read more

JavaScript: What are .extend and .prototype used for?

Javascript’s inheritance is prototype based, so you extend the prototypes of objects such as Date, Math, and even your own custom ones. Date.prototype.lol = function() { alert(‘hi’); }; ( new Date ).lol() // alert message In the snippet above, I define a method for all Date objects ( already existing ones and all new ones … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)