5 .module("nero.app.external-services", ["pascalprecht.translate", "toastr"])
6 .config(externalServicesConfiguration);
11 externalServicesConfiguration.$inject = ["$translateProvider", "toastrConfig"];
14 Modules configuration : set the locale variable for angular-moment and translate
16 function externalServicesConfiguration($translateProvider, toastrConfig) {
17 var language = Liferay.ThemeDisplay.getLanguageId();
19 //Translate module configuration
20 $translateProvider.useStaticFilesLoader({
22 prefix: Global.Theme.getURLPortal() + Liferay.ThemeDisplay.getPathJavaScript() + "/angularjs/locale/app-lang-",
26 $translateProvider.registerAvailableLanguageKeys(['en', 'fr'], {
37 $translateProvider.preferredLanguage(language);
38 $translateProvider.useSanitizeValueStrategy("escape");
39 //$translate.use(); to switch language at runtime
41 angular.extend(toastrConfig, {
43 containerId: 'toast-container',
46 positionClass: 'toast-top-right',
47 preventDuplicates: false,
48 preventOpenDuplicates: false,