[TYPO3] Internationalize data from static tables (static_info_tables)

Manuel Rego Casasnovas mrego at igalia.com
Fri May 18 09:26:10 CEST 2007


Hi everyone.

I want to show to the frontend user a list with the countries from the
static_countries table. And I'd like that this list was translated
according to the user language (in this case: english or spanish).

For this I've installed the static_info_tables and static_info_tables_es
extensions.
To show a list in english I don't have any problem.
The problem is that when the frontend user language is spanish the list
showed is in english too.

I've been seeing the static_info_tables and static_info_tables_es source
code, and I think that I know where is the problem, but I don't know how
to resolve it.

The problem is in the getTCAlabelField function at line 94 of
tx_staticinfotables_div class. In that line there are the next condition:
if (is_array($TCA[$table]['columns'][$labelField]))
But when the execution arrives here, my TCA array doesn't include the
cn_short_es column.
However if I see the TCA configuration in backend (Tools->Configuration)
$TCA['static_countries']['columns']['cn_short_es'] exits.
Moreover the column cn_short_es is indicated in
$TCA['static_countries']['feInterface'].

Something strange is that if I active the frontend administration panel
(config.admPanel = 1), and I click in the edition option, then the
countries names list is translated.

I don't know that the administration panel does when I click the edition
option.
I do not know either if there is some relation between the values in
$TCA['static_countries']['feInterface'] and the edition option.

Somebody could explain me how it works?

Thank you very much,
   Rego

--
http://www.igalia.com


More information about the TYPO3-english mailing list