我使用角翻译以及从文件中加载的翻译使用$ translateProvider.useStaticFilesLoader
I'm using angular-translate in my Angular (v1.x) app as well as loading translations from files by using $translateProvider.useStaticFilesLoader
angular.module('myApp',['pascalprecht.translate'])
.config(function($translateProvider) {
$translateProvider.useStaticFilesLoader(
prefix: window.location.pathname.replace(/[\\\/][^\\\/]*$/, '') + '/__languages/', // absolute path + language path
suffix: '.json'
});
// $translateProvider.useLocalStorage();
}
完美角翻译的作品,但是当它涉及到使用:
Angular-translate works perfectly but when it comes to use:
$translateProvider.useLocalStorage();
(在上面的code注释)如本指南rel=\"nofollow\">在