So, I need help... I dont know how to do this...
I have an angular app that is using "sails" to work with sockets. I'm using "$sails" service.
Before the app start, After socket is connected, I want to call my rest services using socket to get current logged user languages. I need the "locale" to start "angular-translate" and load static file with translations.
Do U Know how can I do this?
I think you wouldn't need to input to database for translation use because you can try to use local storage translation for get the current language
$translateProvider.useLocalStorage();
then on your UI do this on your script (correct me if im wrong or either there's another angular solution on this one)
localStorage.getItem('NG_TRANSLATE_LANG_KEY')
but before you do that, you need to install their plugin try to find angular translate local storage or do this on your command prompt
$ bower install angular-translate-storage-local //if you are using bower
$ npm install angular-translate-storage-local // if you are using npm
hope it's working :)