2 /* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
3 and is published under the AGPL license. */
5 class Syj_View_Helper_LocaleShort extends Zend_View_Helper_Abstract
7 public function localeShort() {
8 $translator = $this->view->getHelper('translate')->getTranslator();
9 $locale = $translator->getLocale();
10 if (!($translator->isAvailable($locale))) {
11 $defaults = Zend_Locale::getDefault();
13 $locale = key($defaults);
15 $locale = new Zend_Locale($locale);
16 return $locale->getLanguage();