Typo3 Localize your own extensions

When you try to write your own front end (FE) extensions with Typo3 there are common pitfalls. First of all be sure you enabled your table to hold the information. (Can be done very easy via the kickstarter). Next be sure you don’t query do much information of your table. All you need are the row where “sys_language_uid=0″. Your translation is made via the getRecordOverlay ! This short code snippet may help you to resolve your problems:

function readDBRecord( $table, $where )
     $back = array();

     if ( $where!=”” )
     $where.= ” AND “;
     $where .= ” deleted=0 AND hidden = 0 AND sys_language_uid=0″;

     $res = $GLOBALS[‘TYPO3_DB’]->exec_SELECTquery( ‘*’, $table, $where );

     while ($row = $GLOBALS[‘TYPO3_DB’]->sql_fetch_assoc($res))
          if ($GLOBALS[‘TSFE’]->sys_language_content)
               $OLmode = ($this->sys_language_mode == ‘strict’?’hideNonTranslated’:”);
               $row = $GLOBALS[‘TSFE’]->sys_page->getRecordOverlay( $table, $row, $GLOBALS[‘TSFE’]->sys_language_content, $OLmode);
          $back[] = $row;
     return $back;

If you have any query then feel free to contact me at Jainish Senjaliya


One thought on “Typo3 Localize your own extensions

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s