DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

EXT: cab realurl language selector

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed:2006-04-05T09:51:10
Author:andi zaugg
Email:az@cabag.ch
Info 3:cab services ag
Info 4:

EXT: cab realurl language selector

Extension Key: cab_realurl_languageselector

Copyright 2006, andi zaugg, <az@cabag.ch> & raphael wälterlin, <rw@cabag.ch>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

EXT: cab realurl language selector 1

Introduction 1

What does it do? 1

Dependencies 2

Users manual 2

Adminstration 2

Configuration 2

Known problems 2

To-Do list 3

Changelog 3

Introduction

What does it do?

There are many approaches to and solutions for TYPO3 language selection. Based on the extension RealURL in combination with adaltas_realurl_i18n, the cab_real_url_languageselector features URL path translation when switching the language in the frontend selection.

Up to now, the URL output was as below when switching the language:

http://...?id=25&L=1

RealURL starts working again when selecting another page using the new language, but not when actually switching to the new language itself (see example above). cab_real_url_languageselector makes the URL output as follows when switching languages in the frontend:

http://.../en/about.html

|img-1|

Dependencies

cab_real_url_languagaselector is dependent on RealURL and the extension adaltas_realurl_i18n, which makes URL path translation possible at all.

Users manual

Create a new typoscript object and specify it as TEXT-object. Then configure the object as shown in the following example:

lib.language = TEXT
        lib.language.postUserFunc = tx_cablanguageselector_pi1->main
        lib.language.postUserFunc{
                atag.before = <a href="|">
                atag.beforeACT = <a class="ACT" href="|">
                atag.after = </a>
                disableACT = 0
                linkACT = 1
                wrap = <li>|</li>
                startUID = 1
                #allWrap =|   /   |*| |   /   |*| |
        }

The language keys in the language selection of the website are taken from an array within localconf.php as shown in the example below:

'valueMap' => array(
 'de' => '0',
 'en' => '1',
 'fr' => '2',
),

If you'd like to change the language keys, simply add a new array after the one above as shown in the example below:

'valueDescription' => array(
 'de' => 'deutsch',
 'en' => 'english',
 'fr' => 'francais',
),

The RealURL path for a page is only stored in the database when the page has actually been visited. The cab realurl language selector extension doesn't work for pages that have not been visited.

Adminstration

To install this extension, simply import it from the TER and install it as you would do with every other extension. There is no installation-time-configuration required.

Configuration

The following properties are possible regarding this extension:

atag.before

Property

atag.before

Data type

string

Description

Use this property to overwrite the default opening tag.

Default

<a href=”|”>

atag.beforeACT

Property

atag.beforeACT

Data type

string

Description

Use this property to overwrite the default atag.before for the language link that is currently active.

Default

atag.after

Property

atag.after

Data type

string

Description

Use this property to overwrite the default closing tag.

Default

</a>

disableACT

Property

disableACT

Data type

boolean (0/1)

Description

If set to 1, the language key that is currently active won't be displayed in the language selection.

Default

0

linkACT

Property

linkACT

Data type

boolean (0/1)

Description

If set to 0, atag.before and atag.after are disabled.

Default

1

wrap

Property

wrap

Data type

string

Description

Set a wrap around atag.before and atag.after.

Example:

<li>|</li>

Default

startUID

Property

startUID

Data type

integer

Description

Define the uid of the root page. This property is used to display the link of the index-page in RealURL format.

Default

allWrap

Property

allWrap

Data type

string

Description

Use this property to define a wrap around the whole string.Example 1:allWrap =start | end...Example 2:

allWrap =|   /   |*| |   /   |*| |

Default

Known problems

None at the moment

To-Do list

Feel free to suggest something

Changelog

Version :

Version

Version :

Date

Date :

Changelog

Changelog :

1.0.0

Version

1.0.0

Date

2006-03-23, 15:00 CET

Changelog

Initial release / Update release cab real url languageselector

1.0.1

Version

1.0.1

Date

2006-04-05, 10:00 CET

Changelog

Update multidomain possibilities, Update allWrap funktion

img-2 EXT: cab realurl language selector - 3