Last active
October 5, 2016 21:00
-
-
Save miguelplazasr/2e42afef40ee6372b1c8dd9f2d3073a8 to your computer and use it in GitHub Desktop.
Configura Angular para las traducciones
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* i18n for Angular (https://angular-translate.github.io/) | |
* | |
* | |
*/ | |
(function () { | |
'use strict'; | |
angular | |
.module('MyApp') | |
.config(translateProvider); | |
/* @ngInject */ | |
function translateProvider($translateProvider, $translatePartialLoaderProvider) { | |
$translatePartialLoaderProvider.addPart('AppBundle'); | |
$translateProvider.useLoader('$translatePartialLoader', { | |
urlTemplate: '/api/translates/{part}/locales/{lang}.json' | |
}); | |
$translateProvider.preferredLanguage('en'); | |
$translateProvider.useSanitizeValueStrategy('sanitize'); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment