'use strict';

angular.module('arethusa.core').directive('langSpecific', [
  'languageSettings',
  function(languageSettings) {
    return {
      restrict: 'A',
      link: function(scope, element, attrs) {
        var settings = languageSettings.getFor('treebank');
        if (settings) {
          element.attr('lang', settings.lang);
          element.attr('dir', settings.leftToRight ? 'ltr' : 'rtl');
          element.css('font-family', settings.font);
        }
      }
    };
  }
]);

'use strict';

angular.module('arethusa.core').directive('langSpecific', [
  'languageSettings',
  function(languageSettings) {
    return {
      restrict: 'A',
      link: function(scope, element, attrs) {
        var settings = languageSettings.getFor('treebank') || languageSettings.getFor('hebrewMorph');
        if (settings) {
          element.attr('lang', settings.lang);
          element.attr('dir', settings.leftToRight ? 'ltr' : 'rtl');
          element.css('font-family', settings.font);
        }
      }
    };
  }
]);

Check hebrew document in langSpecific
Check hebrew document in langSpecific

Very troublesome to hardcode this - we have to defer a decision on this
a little longer.
