It\'s really easy to have select options translated with angular-translate:
You could supply a predicate function to orderBy
and have that function return the translated value. It means you also have to pass in the $filter
service to your controller because you'd need to invoke translate
inside your JS code.
So, to offer some code as guidance:
// CONTROLLER
// * Don't forget to inject the $filter service
$scope.translated = function(p) {
return $filter('translate')('LANGUAGE.' + p.id);
}
And then you'd modify your orderBy
expression:
... | orderBy:translated
I realise the suggestion seems somewhat convoluted because one translation attempt occurs within ng-options
and then another in orderBy
, but it should sort the select
options as you'd expect.