Utpal
Utpal

Reputation: 807

Getting error when trying to use translation using angular-translate

In my application i am trying to use localization featrure and for that I am using angular-translate.js . When I am trying to configure the translation using a static JSON file , I am getting the error couldnot

Failed to load resource: the server responded with a status of 404 (Not Found) http://mydomain.com/JsonFiles/locale-en.json

I have written the below code for using translation feature from a JSON file.

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

But it is giving error . Please tell me where I have made the mistake.

Thanks Utpal

Upvotes: 0

Views: 1455

Answers (1)

Assaf Ganor
Assaf Ganor

Reputation: 11

If it still relevant... I had this problem with IIS web server, by default it doesn't support *.json extension. See this question: How to allow download of .json file with ASP.NET

Upvotes: 1

Related Questions