Skip to content

Instantly share code, notes, and snippets.

@abjerner
Created April 22, 2015 08:31
Show Gist options
  • Save abjerner/3a229b2d7a9eeef36b15 to your computer and use it in GitHub Desktop.
Save abjerner/3a229b2d7a9eeef36b15 to your computer and use it in GitHub Desktop.
Adding custom translations to Umbraco backoffice
$(window).load(function () {
var ev = angular.element(document).injector().get('eventsService');
ev.on('localizationService.updated', function () {
var ls = angular.element(document).injector().get('localizationService');
ls.dictionary['bacon_omgbacon'] = 'OMG BACON';
});
});
@greystate
Copy link

So if I'd mashed this in, I'd be able to use the <localize key="bacon_omgbacon">OMFGB</localize> directive in my views?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment