In Zend framework 1 I can do
try {
$locale = new Zend_Locale('browser');
} catch (Zend_Locale_Exception $e) {
$locale = new Zend_Locale('en');
}
$registry = Zend_Registry::getInstance();
$registry->set('Zend_Locale', $locale);
But how does it work with Zend Framework 2?
Judging from this RFC, the decision was taken to leave Zend_Locale out of Zend Framework 2 and rely on the core PHP I18n classes.
I would recommend reading the manual starting with the introduction to get a good understanding of the classes and then refactoring your code to use them.