Ejemplo n.º 1
0
 /**
  * Get the locale from the translator.
  *
  * @param string $default Default to use if translator absent.
  *
  * @return string
  */
 public function getTranslatorLocale($default = 'en')
 {
     return null !== $this->translator ? $this->translator->getLocale() : $default;
 }
 public function getLocale() : string
 {
     return $this->translator->getLocale();
 }
Ejemplo n.º 3
0
 /**
  * Get availability infos for item element
  *
  * @param    String $sysNumber
  * @param    String $barcode
  * @param     String $network
  * @return    Array|Boolean
  */
 protected function getAvailabilityInfos($sysNumber, $barcode, $bib)
 {
     $userLocale = $this->translator->getLocale();
     return $this->availability->getAvailability($sysNumber, $barcode, $bib, $userLocale);
 }
Ejemplo n.º 4
0
 /**
  * Get converted language
  * Language is current selection of user. Converts are defined in config by lang_de = GER
  *
  * @return    String
  */
 protected function getConvertedLanguage()
 {
     $userLanguage = $this->translator->getLocale();
     return $this->hasConfigValue('lang_' . $userLanguage) ? $this->config->get('lang_' . $userLanguage) : 'GER';
 }