I am looking to transform the 'i18n' function into a factory in order to return a value instead of just setting it.
Any suggestions or tips would be greatly appreciated!
services.factory('i18nFactory', function() {
var language = 'nl';
$.i18n.properties({
name: 'messages',
path: 'i18n/',
mode: 'map',
language: language
});
return {
getLanguage: function() {
return language;
}
};
});