I init the first time my $translateProvider as this:
app.config(["$translateProvider", function ($translateProvider) {
$translateProvider.translations('en', translate_EN);
$translateProvider.preferredLanguage('en');
}]);
Then I want to give later another JSON without any reload of page to en how can I do that?
Approach - 1 :
inside
app.configfunction set translateProvider as below:When change the language just call :
In above code I have assume that name of resource file given as below:
Approach - 2 :
inside
app.configFor CustomLoader :
In
TranslationServicefile:I am not sure but I think it works for you in case of dynamic resource.
let me know which approach is work for you. Happy coding.