angular-translate, issue with static loader (file loader)

Viewed 9801

I'm working with angular-tranlate.

I got it working with the $translateProvider.translations('en', en_translations); where en_translations is the json with the mapping.

Now I'm having a problem when trying to use static files:

    $translateProvider.preferredLanguage('en');

$translateProvider.useStaticFilesLoader({
    prefix: 'locale-',
    suffix: '.json'
});

I'm receiving this error:

    Error: Unknown provider: $translateStaticFilesLoaderProvider <- $translateStaticFilesLoader

throw Error("Unknown provider: " + path.join(' <- '));

I have my locale-en.json file in the same location as the scrips file. and it looks like this:

{
            "WELCOME": "Welcome",
            "LANG": {
                    "LABEL": "Language",
                    "EN": "English",
                    "ES": "Spanish"
                },
            "LOGOFF": "Log Off",
            "PROFILE": "Profile"
}

Any ideas?? thanks!!

1 Answers
Related