/** * Returns a delete select box. All data is stored in array $data. * @param array $data * @param array $options * @return boolean */ public function showLanguageSelector(&$data, $options = array()) { $items = array('' => '', -1 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages'), 0 => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_general.xml:LGL.default_value')); tx_rnbase::load('tx_mklib_mod1_util_Language'); $langs = tx_mklib_mod1_util_Language::getLangRecords($options['pid']); foreach ($langs as $lang) { $items[(int) $lang['uid']] = $lang['title']; } $options['label'] = $options['label'] ? $options['label'] : $GLOBALS['LANG']->getLL('label_language'); return $this->showSelectorByArray($items, 'language', $data, $options); }
/** * Renders the language column. * Renders the flag and the title of the sys language record. * Renders some links to create the overlay too. * * @param tx_rnbase_model_base $item * @return string */ protected function getSysLanguageColumn(tx_rnbase_model_base $item) { if ($item->getTableName()) { tx_rnbase::load('tx_mklib_mod1_util_Language'); $ret = tx_mklib_mod1_util_Language::getLangSpriteIcon($item->getSysLanguageUid(), array('show_title' => TRUE)); $new = tx_mklib_mod1_util_Language::getAddLocalizationLinks($item, $this->getModule()); /** * @TODO: compatibility with Typo3 4.x? xml files instead of xlf files */ if (!empty($new)) { $ret .= ' (' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xlf:Localize') . ' ' . $new . ')'; } } return empty($ret) ? FALSE : $ret; }