I need to add my translation files outside the assets directory, something like this:
src/app/custom/i18n/en.json
I am loading the translations like this:
export function createTranslateLoader(http: HttpClient) {
return new TranslateHttpLoader(http, './app/custom/i18n/', '.json');
}
But this doesn't work as it doesn't find the file:
GET http://localhost:8100/app/custom/i18n/en.json 404 (Not Found)
I tried to customize the angular.json file in order to be able to access files outside 'assets', doing something like this:
"assets": [
{
"glob": "**/*",
"input": "src/assets",
"output": "assets"
},
{
"glob": "**/*",
"input": "src/app/common",
"output": "assets"
}
]
but I still get that 404 error. Please advise how could I set the translation to use json files from outside assets. Thank you!