mwasiluk / angular-surveys

Angular survey / form builder inspired by Google Forms
http://mwasiluk.github.io/angular-surveys
Apache License 2.0
241 stars 135 forks source link

Is there a quick way of removing the i18n from this module... #32

Open dawityifter opened 7 years ago

dawityifter commented 7 years ago

I am facing some issue with angular-translate module during config of the module and I really do not care for translation to other languages. Is there a quick way of excluding the internationalization?

vangorra commented 7 years ago

The module seems to heavily integration with angular translations. While you would have trouble removing the dependency on the translate module entirely, I have found a way to force my resulting module to use a single translation.

angular.module(...)
    .config(function($translateProvider: angular.translate.ITranslateProvider){
        $translateProvider.translations('en', require('angular-surveys/dist/i18n/en/angular-surveys.json'));
        $translateProvider.preferredLanguage('en');
    })
...