In all those places, it is used as a title preceding the person's name, much like "Prince", "Duke", "Earl", "Baron" or "Lord".
In English, one would say His Royal Highness (Styling) Prince (address/title) Andrew (name), Duke of York (noble title).