Hi @fabioferrero!
Thanks for your good idea. I'm using only one file for all translation cause i'm update the language on demand at changes.
My json-File:var t9N = {"serial":1453205597,"language":{"de":"LANGUAGE.1","en":"LANGUAGE.2"},"t9n":{"de":{"APP.BUTTON.NEXT":"Next","APP.BUTTON.BACK":"Back", ......
How can i "parse" my file to use it later with$translate.use(language);
Thats my service at the moment:
angular.module('starter')
.factory('languageService', function ($http, $q) {
return function (options) {
var deferred = $q.defer();
$http.get(cordova.file.dataDirectory + files.t9nFile).success(
function (data) {
var data = data.language;
}, function (error) {
}
);
/*
var data = {
'TEXT': 'Fooooo'
};
*/
return deferred.resolve(data);
// or
return deferred.reject(options.key);
};
});