Sid55813
Sid55813

Reputation: 123

Unable to translate in angular using angular translate

$scope.barChartData.labels.push(moment(currentDate).format("YYYY-MM-DD") + "  
$filter('translate')('To')" + moment(currentDate).add(4, 'days').format("YYYY-MM-DD"));

trying to translate "To" word

Upvotes: 2

Views: 115

Answers (1)

Narendra Singh Rathore
Narendra Singh Rathore

Reputation: 706

Reviewing this 2 lines, i found that you are using lib chart.js

for generating chart in angularjs app. And it create a svg based on data provided. So you need to again reload that svg in html with the same process of creating svg so that it is use translation based on language selection at that time. Let me know if this solves the issue.

Upvotes: 2

Related Questions