Inside TYPO3

3.9.2. The locallang files for CSH

First of all you are strongly encouraged to use the locallang file structure where the default document sets "EXT" as value for the localized labels so that sub-files are included. This will load the system less and make it all easier to manage.

Then there are a few other rules to follow:

  1. Prefix the locallang files "locallang_csh_" so that translators can easily spot these files (which has a secondary priority compared with other locallang files!).

  2. Observe the filename length, which should be maximum 31 chars in total! Since the prefix "locallang_csh_" takes 14 chars, the extension ".php" takes four and any "subfile-suffix" (fx. ".dk") would take three, there is 31-14-4-3 = 10 chars left. So lets say you have 9 characters to name the file to be safe.

    Examples where "pages" (5 chars) is the unique name:

      locallang_csh_pages.php    =>    23 chars
    
      locallang_csh_pages.dk.php    =>    26 chars
    

     

  3. Observe the label-key naming by the syntax [fieldname].[type-key].[special option] (see previous section)

  4. Label-key names that are prefixed "_" can safely be used - the prefix is simply removed! This is encouraged for the "seeAlso" and "image" field names since those are in common for all languages and therefore doesn't need translation (the typo3.org translation tool ignores label-keys which are prefixed "_").

  5. When used with database tables: Blank fieldnames are used for information about the database table itself - non-blank fieldnames are expected to point to the actual fieldnames.

  6. For the locallang-XML files which are translated by a backend module you can place images in a subfolder, "cshimages/", to where the locallang-file is located and they will be shown in a selector box inside the translation tool.

Syntax for the type-keys content

type-key

Syntax

description

Text / XHTML. Mandatory.

details

Text / XHTML. Optional.

syntax

Text / XHTML. Optional.

image_descr

Text. Optional.

image

Reference to an image (gif,png,jpg) which will be shown below the syntax field (before seeAlso)

The reference must be

  1. a) either relative to the TYPO3_mainDir (fx. "gfx/i/pages.gif") or

  2. b) related to an extension (fx. "EXT:context_help/descr_imgs/hidden_page.gif")

 

You can supply a comma list of image references in order to show more than one image. The image_descr value will be splitted per linebreak and shown under each image.

seeAlso

Internal hyperlink system for related elements. References to other TCA_DESCR elements or URLs.

 

Syntax:

  1. Separate references by comma (,) or line breaks.

  2. A reference can be:

    1. either  a URL (identified by the 'second part' being prefixed "http", see below)

    2. or a [table]:[field] pair

  3. If the reference is an external URL, then the reference is splitted by vertical line (|) and the first part is the link label, while the second part is the "http"-URL

  4. If the reference is to another internal TCA_DESCR element, then the reference is splitted by colon (:) and the first part is the table while the second is the field.

 

External URLs will open in a blank window. The links will be in italics.

Internal references will open in the same window

For internal references the permission for table/field read access will be checked and if it fails, the reference will not be shown.

 

Example:

pages:starttime , pages:endtime , tt_content:header , Link to TYPO3.org | http://typo3.org/

alttitle

Alternative title shown in CSH pop-up window.

For database tables and fields the title from TCA is fetched by default, however overridden by this value if it is not blank.

For modules (tablename prefixed "_MOD_") you must specify this value, otherwise you will see the bare key outputted.

 

In all cases of "Text" above <strong>, <em>, <b>, and <i> is allowed as HTML tags. Make HTML-tag names and attributes in lowercase! Must be XHTML compliant.

To top


Valid XHTML 1.0!