I am working on application which has around 5-6 front panels (angular) and back end is managed in node and mysql. I have to give support for multi language support for (Arabic, Chinese, English, French etc.).
One of my friend shared me a link but somehow I have missed that so starting again. Initially we were thinking to send these translated files (ar.json,en.json,fr.json etc.) from server along with other front-end code, but due to large codebase and number of panels or future support for more languages so we decided to keep our translated files(json) on server only.
What is bothering me is the preferred and standard way to achieve this on sending data from server to front-end, e.g. if a user chooses the language from dropdown, api will be hit and his/her preferences will be set in db and translated data will be sent in response (here i am little bit confused do I need to send that translated file or JSON data).
If I need to send a file how would I append path at front-end for translation OR if I will be sending JSON(i.e. translated data) then how will I store and manage it throughout the app.
Definitely I have missed something or made some wrong approach. Any suggestions or links will be appreciated.
P.S. For front-end side I am using Angular Translate and in total I have 4 panels and in all 4 panels I have to support 4 languages. I have all JSON files for a key to its translation. All I am confused is sending data and maintaining its state.
Thanks.
Marco Alka
Software Engineer, Technical Consultant & Mentor
Hashnode Search ->