I am using uploadcare widget in my angularjs-based application. I integrated this widget as angular directive.
Documentation said, that I should set global variable to change locale:
<script>
UPLOADCARE_LOCALE = 'ru';
</script>
But I am not very familiar with angular. So, I have no idea how do it dynamically.
I'll be glad of any help.
Update
I tryed to add $rootScope to my uploadcare directive and set UPLOADCARE_LOCALE variable there:
angular.module("project").directive 'projectUploadcare', ($uploadcare, $rootScope) ->
restrict: 'E'
replace: true
template: '''
<span>
<span class="uploadcare-preview"></span>
<input type="hidden">
</span>
'''
link: (scope, element, attrs) ->
$rootScope.UPLOADCARE_LOCALE = 'ru'
... other code ...
but it does not help.