/**
  * Create the instance of this payment method translator
  *
  * @param string $lang language iso code
  */
 public function __construct($lang)
 {
     if ($lang === null) {
         $lang = 'en';
     }
     KlarnaUtils::configureKITT();
     $this->_translator = KiTT::translator(KiTT::locale(null, $lang));
 }
 /**
  * Translate a string from the languagepack.
  *
  * @param string                    $sTitle title of the wanted translation.
  * @param KlarnaLanguage|int|string $lang   language to translate to.
  *
  * @return string the translated string.
  */
 public function translate($sTitle, $lang = null)
 {
     return KiTT::translator(KiTT::locale($this->_country, $lang))->translate($sTitle);
 }
 /**
  * Build and return the title for the admin backend.
  *
  * @return string
  */
 private function _title()
 {
     $tulip = '<span class="klarna_icon"> </span>';
     if ($this->_isInvoice()) {
         return $tulip . KiTT::translator($this->_locale)->translate('MODULE_INVOICE_TEXT_TITLE');
     }
     if ($this->_isPart()) {
         return $tulip . KiTT::translator($this->_locale)->translate('MODULE_PARTPAY_TEXT_TITLE');
     }
     if ($this->_isSpec()) {
         return $tulip . KiTT::translator($this->_locale)->translate('MODULE_SPEC_TEXT_TITLE');
     }
 }