ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

Files

Summary

Sets which transformation files are used by this transformation group (block name).

Usage

 

Files[]=<file.tr>

Description

Sets the transformation files that are used by this transformation group (the block name), and from which the rules of character transformation should be taken from.
The process of selecting the proper files which are to be used by the system, is described here through an example. Let's say that the current eZ Publish installation uses the "utf-8" charset.
On the first step the system will go through the Charset setting located under the [Transformation] block, which consists of two parts, the charset and the group it maps to, separated with a semicolon. If the first part matches the current charset, the second part is added to the list of blocks that will be used.
For the "utf-8" charset there will be four default matches in Charset:

Charsets[]=utf-8;latin
Charsets[]=utf-8;cyrillic
Charsets[]=utf-8;greek
Charsets[]=utf-8;hebrew


During the second step, the system will search for the transformation files in the corresponding blocks:

[latin]
 
Files[]=latin.tr
Extensions[]=my_extension
 
[cyrillic]
 
Files[]=cyrillic.tr
Extensions[]
 
[greek]
 
Files[]=greek.tr
Extensions[]
 
[hebrew]
 
Files[]=hebrew.tr
Extensions[]


Therefore, there are four transformation files to load that are mentioned in the Files setting (latin.tr, cyrillic.tr, greek.tr and hebrew.tr), also transformation files linked to the used extensions will be loaded.
The repository setting controls where the transformation files mentioned in the Files setting are located. The system will also look for the transformation files in the extensions defined in the Extensions setting, more specifically in the extensions "transformations" folder (for example "my_extension/transformations/transform.tr").
So far five transformation files will be loaded by the system according to our example settings:
latin.tr
cyrillic.tr
greek.tr
hebrew.tr
transform.tr
On the third step the system will look through the other relevant blocks in transform.ini and add the transformation files to the list, if any are specified. Thus, if for example the search engine is working on request and the [search] block in transform.ini looks like this:

[search]
 
Files[]
Files[]=search.tr


The system will then also load the "search.tr" file in addition to the other five files that are described above.
So now, when the search engine is working on a request and the current charset of eZ Publish is set to "utf-8", the system will now take the rules of character transformation from the following transformation files:
latin.tr
cyrillic.tr
greek.tr
hebrew.tr
transform.tr
search.tr
In case these different loaded files have the same transformation rules, the system will use the rules from the file that was loaded last. Thus, in the following example the matching rules from "latin.tr" will be overridden with the rules from the "my_extension" extension.

[latin]
 
Files[]
Files[]=latin.tr
 
Extensions[]
Extensions[]=my_extension


This concludes our example.
The following files are located in the "share/transformations" folder, and can thus be used as value:

  • basic.tr: contains the basic formatting rules.
  • ascii.tr: contains the rules of transformation for ACII handling, which is the basis for all characters.
  • cyrillic.tr: contains the rules of transformation related to Cyrillic characters.
  • greek.tr: contains the rules of transformation related to Greek characters.
  • hebrew.tr: contains the rules of transformation related to Hebrew characters.
  • latin.tr: contains the rules of transformation related to Latin characters
  • search.tr: contains the rules of transformation related to search handling, which is used to normalize search requests to make it clear for the search engine.

Examples

example 1

 

[latin]
 
Files[]=latin.tr


In this block the special transformations for latin (latin1, latin extended-a, latin extended-b) are set. And the extra transformation file latin.tr will be used for this group.

example 2

 

[cyrillic]
 
Files[]=cyrillic.tr


In this block the special transformations for cyrillic are set. And the extra transformation file cyrillic.tr will be used for this group.

Ester Heylen (22/06/2010 11:42 am)

Ester Heylen (22/06/2010 12:53 pm)


Comments

There are no comments.