Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

Files

Summary

Sets which transformation files are used by the default transformation group.

Usage

 

Files[]=<file.tr>

Description

This setting sets which default transformation files the system will use to take the rules of character transformation from. For the specific groups the files are matched to the corresponding transformation groups controlled by the Groups setting. For example:

[Transformation]
 
Groups[]
Groups[]=groupname
 
Files[]
Files[]=latin.tr
Files[]=greek.tr
 
[groupname]
 
Files[]=hebrew.tr

 

The process of selecting the proper files, which are to be used by the system, is described here through the following example.

Let's say that the current eZ Publish installation uses the "utf-8" charset.
On the first transformation step the system will go through the Charset setting located under the [Transformation] block which consists of two parts, charset and group, separated by a semicolon. If the first part matches the current charset, the second part is added to the list of blocks that will be used to look for transformation files.
For the "utf-8" charset there will by default be four 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[]


Consequently, there are four transformation files to load that are mentioned in the Files setting (latin.tr, cyrillic.tr, greek.tr and hebrew.tr), as well as the transformation files that will be loaded based on the used extensions.
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 (plus possible files based on the extensions):
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 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

Files[]
Files[]=basic.tr
Files[]=ascii.tr

This is the default setting.

Ester Heylen (22/06/2010 10:54 am)

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


Comments

There are no comments.