Translate field in FCE

Generally FCE cannot be translated, like normal tables. How we may use two fields like field_fr, field_en, and then display the related info according to the language.

  
EX:
      
10 = COA
10 {
#Translation for primary language (L=0) 30 = TEXT 30.field = field_slide_info 30.stdWrap.wrap = <p>|</p> 30.if { value = 0 equals.data = gp:L }
    #Translation for second language (L=1)
40 = TEXT 40.field = field_slide_info_en 40.stdWrap.wrap = <p>|</p> 40.if { value = 1 equals.data = gp:L } }

Tesseract Tips / Notes

DATA FILTER:

Clear Filter/Query Cache: In some situations when “Additional SQL” field is cleared, the dataquery may still be using the cached value from this field.
In such case we should add following URL Parameter, which informs DataQuery to re-build the query from scratch.

EX:
www.example.com/?clear_cache = 1

Using main.subtable: When we wish to apply a specific condition to a sub-table, the query is applied on the JOIN itself:

EX 1:
subtable.uid = vars:event
maintable.uid = varsproject

This is translated to someting like this:

SELECT maintable.*, subtable.*
FROM maintable JOIN subtable
ON maintable.event_id = subtable.uid AND subtable.uid = 20
WHERE
maintable.uid = 45

However, if we add main.subtable.uid… the query gets converted to as shown below:
EX 2:
main.subtable.uid = vars:event
maintable.uid = varsproject

This is translated to someting like this:

SELECT maintable.*, subtable.*
FROM maintable JOIN subtable
ON maintable.event_id = subtable.uid
WHERE
subtable.uid = 20 AND maintable.uid = 45

Avoid translation of field using TCA and l10n_mode

For a field which must not really be translated (such as a event date)

l10n_mode : exclude ( do not translate this)
l10n_display : defaultAsReadOnly ( show field as read only in translated
records)

This way translators see the field data, but can’t change it. This is the most logical for such a field.
Please refer doc_core_tca for more details about these two settings.