[TYPO3-translators] New extension static_info_tables_ga for galician language
Franz Holzinger
franz at fholzinger.com
Wed Aug 8 11:07:47 CEST 2007
Hello Rego,
> Moreover there is one problem using '_ga' or '_gz' in the future
> extension (I'm having this problem now) is that static_info_tables use
> the user language to translate correctly the data and it gets the
> language from $GLOBALS['TSFE']->lang that is 'gl', this value is the ISO
> code not the Typo3 code.
> Is this true?
In static_info_tables/pi1/class.tx_staticinfotables_pi1.php you have:
/**
* Returns the current language as iso-2-alpha code
*
* @return string 'DE', 'EN', 'DK', ...
*/
function getCurrentLanguage() {
global $TSFE, $TYPO3_DB;
$langCodeT3 = $TSFE->lang;
$csConvObj = $TSFE->csConvObj;
$res = $TYPO3_DB->exec_SELECTquery(
'lg_iso_2,lg_country_iso_2',
'static_languages',
'lg_typo3='.$TYPO3_DB->fullQuoteStr($langCodeT3,'static_languages')
);
while ($row = $TYPO3_DB->sql_fetch_assoc($res)) {
$lang =
$row['lg_iso_2'].($row['lg_country_iso_2']?'_'.$row['lg_country_iso_2']:'');
}
$rc = $lang ? $lang : $csConvObj->conv_case('utf-8',$langCodeT3,'toUpper');
return $rc;
}
So you have the lg_typo3 field in the static_languages table.
If you want to add a new language then a new record for this table will
be needed.
But in the case of Galician this language is already present. Only the
value lg_typo3 must be added here.
Send it to me to get this into the static_info_tables extension.
- Franz
More information about the TYPO3-translators
mailing list