Mohit points out that right now you aren't binding the value of the ui:checkbox to a component attribute, but that's not of concern here.
Using your code copied and pasted into a new component, I cannot reproduce your error. The checkbox state changes and it reports to console. Is there other code in the mix here? Is that your code verbatim?
That being said, both the dev guide and your code follow a bit of an anti-pattern in the event handler. Instead of setting a findable aura:id and hard referencing that in your controller, your code is much more useful (and would handle a list view) if you use the event source instead. Example:
handleChanged : function(cmp,evt,helper){
var checkbox = evt.getSource();
console.log(checkbox.get("v.value"));
}
This will fine the component that fired the event.
Script tag blocks are not allowed in Lightning Components as they are a security risk. You should put your code in the controller, helper, or renderer as appropriate.
Best Answer
You create an attribute and initialize it using
$A.localizationService
in your controller.Component:
Controller: