need translate data from database using ng2-translate in angular without using JSON file or can we translate text using ng2-translate..
I tried by following code to translate text
this.translate.get("SPANISH") .subscribe((data: string) => { this.value= data; });
Please guide me ..
You should create a custom translation loader: https://www.npmjs.com/package/ng2-translate#write--use-your-own-loader
That also means all translations will be loaded at once. But if there is a lot of data to translate, it's better to use other approach to translate the data (for example - pass the desired language in the URL
?lang=enand return the data translated already).