{"action":"closed","issue":{"url":"https://api.github.com/repos/angular-translate/angular-translate/issues/546","labels_url":"https://api.github.com/repos/angular-translate/angular-translate/issues/546/labels{/name}","comments_url":"https://api.github.com/repos/angular-translate/angular-translate/issues/546/comments","events_url":"https://api.github.com/repos/angular-translate/angular-translate/issues/546/events","html_url":"https://github.com/angular-translate/angular-translate/issues/546","id":32888966,"number":546,"title":"Static file loader / url loader are too rigid","user":{"login":"Narretz","id":1153097,"avatar_url":"https://avatars.githubusercontent.com/u/1153097?v=3","gravatar_id":"","url":"https://api.github.com/users/Narretz","html_url":"https://github.com/Narretz","followers_url":"https://api.github.com/users/Narretz/followers","following_url":"https://api.github.com/users/Narretz/following{/other_user}","gists_url":"https://api.github.com/users/Narretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Narretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narretz/subscriptions","organizations_url":"https://api.github.com/users/Narretz/orgs","repos_url":"https://api.github.com/users/Narretz/repos","events_url":"https://api.github.com/users/Narretz/events{/privacy}","received_events_url":"https://api.github.com/users/Narretz/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-translate/angular-translate/labels/waiting","name":"waiting","color":"e11d21"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-05-06T12:47:46Z","updated_at":"2015-04-12T19:22:28Z","closed_at":"2015-04-12T19:22:28Z","body":"It appears to me that the structure imposed by static file loader / url loader is too rigid. If you think about it, both do basically the same, but have two different patterns that you absolutely must follow. It's no problem that the variable part of the url is the language tag, but sometimes the language tag in the app is not the same as in your endpoint, e.g. app is de-DE, but endpoint is only de.  Worse, url loader always appends &/?lang=<lang_tag> to the url, why is that? It's not good that the translation engine assumes so much about the architecture. (I know that you can simply specify your own parameter, but it's not very clean). It gets stranger, because the partial loader has another completely different way to specifiy the url, from which both static and url loader could benefit, but it's simply not available to them.\r\n\r\nI think static / url loader could basically be amalgated into one loader, barring any technical obstacles. By default, they should use the template matching used in partialLoader. Additionally, the templateUrl should not only accept a string, but a function that has the current language as an argument and returns the finished url. This way, you can have arbitrary urls, for any language.\r\n\r\nI know that you can build your own loaders, but this change would make angular-translate simpler and more powerful at the same time.\r\n\r\nThoughts?"}}