[TYPO3-german] Re: realUrl und tt_news url übersetzung???
Jens Gammelgaard
jens.gammelgaard at optimon.dk
Sat Jun 3 17:13:08 CEST 2006
Hallo,
Here is the update on how to edit localconf.php to make tt_news and
realUrl work with mehrsprachen:
Source Liouma: http://wiki.typo3.org/index.php/Realurl
* realUrl with
o language menu
o nice url for glossary, fotoboek, printlink extensions
o news only on certain pages
o path caching disabled
o 2 sites with different language choices
Works fine only if disablePathCache options is true.
// realurl config
$TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
// spanish subsite with basque & catalan
'espana.tokitsu.com' => array(
'init' => array(
'enableCHashCache' => 1,
// 'appendMissingSlash' => 'ifNotFile',
'enableUrlDecodeCache' => 1,
'enableUrlEncodeCache' => 1,
),
'redirects' => array(
),
'preVars' => array(
array(
'GETvar' => 'no_cache',
'valueMap' => array(
'nc' => 1,
),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'L',
'valueMap' => array(
'es' => '1',
'eu' => '6',
'ca' => '7',
),
//'noMatch' => 'bypass',
'valueDefault' => 'es',
),
),
// use extended page name rendering
// page names are converted to readalbe page/sub-page/sub-sub-page.html
'pagePath' => array(
'type' => 'user',
'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => 3,
'rootpage_id' => 67,
'disablePathCache' => '1',
//
'encodeTitle_userProc'=>'EXT:realurl/tx_realurl_encodeTitle_userProc.php:&user_encodeDates',
),
'fixedPostVars' => array(
),
'fileName' => array(
'index' => array(
//ajout pour printlink :
'print.html' => array(
'keyValues' => array(
type => 98,
)
),
),
'_DEFAULT' => array(
'keyValues' => array(
)
),
// add .html suffix to the end of the path generated
'defaultToHTMLsuffixOnPrev' => 1,
),
),
//#########################################################################################################################
//
'www.tokitsu.com' => array(
'init' => array(
'enableCHashCache' => 1,
// 'appendMissingSlash' => 'ifNotFile',
'enableUrlDecodeCache' => 1,
'enableUrlEncodeCache' => 1,
),
'redirects' => array(
),
'preVars' => array(
array(
'GETvar' => 'no_cache',
'valueMap' => array(
'nc' => 1,
),
'noMatch' => 'bypass',
),
array(
'GETvar' => 'L',
'valueMap' => array(
'fr' => '0',
'es' => '1',
'en' => '2',
'it' => '3',
'jp' => '4',
'pt' => '5',
'eu' => '6',
'ca' => '7',
),
'noMatch' => 'bypass',
),
),
// use extended page name rendering
// page names are converted to readalbe page/sub-page/sub-sub-page.html
'pagePath' => array(
'type' => 'user',
'userFunc' =>
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => 3,
'rootpage_id' => 13,
'disablePathCache' => '1',
//
'encodeTitle_userProc'=>'EXT:realurl/tx_realurl_encodeTitle_userProc.php:&user_encodeDates',
),
'fixedPostVars' => array(
),
'postVarSets' => array(
//tt_news
'964' => array(
// archive
'period' => array(
array(
'condPrevValue' => -1,
'GETvar' => 'tx_ttnews[pS]' ,
'valueMap' => array(
)
),
array(
'GETvar' => 'tx_ttnews[pL]' ,
'valueMap' => array(
)
),
array(
'GETvar' => 'tx_ttnews[arc]' ,
'valueMap' => array(
'archived' => 1,
'non-archived' => -1,
)
),
),
// pagebrowser
'browse' => array(
array(
'GETvar' => 'tx_ttnews[pointer]',
),
),
'select' => array (
array(
'GETvar' => 'tx_ttnews[cat]',
'lookUpTable' => array(
'table' => 'tt_news_cat',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
),
),
),
),
'article' => array(
array(
'GETvar' => 'tx_ttnews[backPid]',
),
array(
'GETvar' => 'tx_ttnews[tt_news]',
'lookUpTable' => array(
'table' => 'tt_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
array(
'GETvar' => 'tx_ttnews[swords]'
),
),
),
'466' => '964',
'465' => '964',
'467' => '964',
'468' => '964',
//Glossaire :
'228' => array(
// glossaire
'lex' => array(
array(
'GETvar' => 'range' ,
'valueMap' => array(
)
),
array(
'GETvar' => 'lex' ,
'valueMap' => array(
)
),
array(
'GETvar' => 'cHash' ,
'valueMap' => array(
)
),
),
),
'227' => '228',
//links
'223' => array(
// links
'links' => array(
array(
'GETvar' => 'action' ,
'valueMap' => array(
//'add' => 'getviewaddnewlink',
//'viewcat' => 'getviewcategory'
)
),
array(
'GETvar' => 'category_uid',
'valueMap' => array(
)
),
),
),
//Photobooks simples :
'1228' => array(
//photos sensei
'photo' => array(
array(
'GETvar' => 'tx_gooffotoboek_pi1_fid',
'valueMap' => array(
)
),
array(
'GETvar' => 'tx_gooffotoboek_pi1_func' ,
'valueMap' => array(
)
),
),
),
//kiko
'329' => '1228',
//danse
'353' => '1228',
//Photobooks avec arbo :
'178' => array(
'photo' => array(
array(
'GETvar' => 'tx_gooffotoboek_pi1_srcdir',
'valueMap' => array(
)
),
array(
'GETvar' => 'tx_gooffotoboek_pi1_fid',
'valueMap' => array(
)
),
array(
'GETvar' => 'tx_gooffotoboek_pi1_func' ,
'valueMap' => array(
)
),
),
),
//taichi
'345' => '178',
'_DEFAULT' => array(
),
),
'fileName' => array(
'index' => array(
//ajout pour printlink :
'print.html' => array(
'keyValues' => array(
type => 98,
)
),
),
'_DEFAULT' => array(
'keyValues' => array(
)
),
// add .html suffix to the end of the path generated
'defaultToHTMLsuffixOnPrev' => 1,
),
),
//#########################################################################################################################
'_DEFAULT' => array(
'init' => array(
'enableCHashCache' => 1,
// 'appendMissingSlash' => 'ifNotFile',
'enableUrlDecodeCache' => 1,
'enableUrlEncodeCache' => 1,
),
'redirects' => array(
),
'preVars' => array(
array(
'GETvar' => 'no_cache',
'valueMap' => array(
'nc' => 1,
),
'noMatch' => 'bypass',
),
),
'fixedPostVars' => array(
),
'fileName' => array(
'index' => array(
//ajout pour printlink :
'print.html' => array(
'keyValues' => array(
type => 98,
)
),
),
'_DEFAULT' => array(
'keyValues' => array(
)
),
// add .html suffix to the end of the path generated
'defaultToHTMLsuffixOnPrev' => 1,
),
),
);
Jens Gammelgaard skrev:
> Hallo,
>
> Sorry that I am writing you in English,- but I wan't to give you a
> temporarily update from a correspondance with some developers - where I
> write... :
>
> If we think global, it seems that what is missing is multiple language
> so that if L=1 then the postVars ex. article changes to artikel if L=2.
>
> If you look at the example about fixedPostVars (you can find it fast by
> searching for condPrevValue:
>
> http://wiki.typo3.org/index.php/EXT/realurl/manual
>
> then it seems to be possible to make a condition that could be aimed at
> L too?
>
> An example of what hopefully with your help could be conditioned to 2
> languages could be this - so that the languages could be in made in 2
> versions for each language:
>
> 'postVarSets' => array(
> '_DEFAULT' => array(
> // news archive parameters
> 'archive' => array(
> array(
> 'GETvar' => 'tx_ttnews[year]' ,
> ),
> array(
> 'GETvar' => 'tx_ttnews[month]' ,
> 'valueMap' => array(
> 'january' => '01',
> 'february' => '02',
> 'march' => '03',
> 'april' => '04',
> 'may' => '05',
> 'juni' => '06',
> 'july' => '07',
> 'august' => '08',
> 'september' => '09',
> 'october' => '10',
> 'november' => '11',
> 'december' => '12',
> )
> ),
> ),
> etc.
>
>
> From there on I think the soulution can be created.
>
> Heads up: What do you say?
>
> Mit freundlichen Grüssen
>
> Jens
>
> Jens Gammelgaard skrev:
>> Hallo,
>>
>> Haben Sie eine „typoscript“ Technik, die ermöglicht, dass „artikel“ im
>> „list view" mit realURL und via tt_news mit dem guten Dänischen Wort
>> übersetzt wird: artikel
>>
>> Und ganz ideal wäre es, falls Sie auch eine Methode kennen, womit der
>> Monat in dem URL übersetzt werden kann.
>>
>> Zum Beispiel:
>>
>> www.yourdomain.de/presse/may/2006/article/typo3-news/
>>
>> Wird zu:
>>
>> www.yourdomain.de/presse/maj/2006/artikel/typo3-news/
>>
>> Im Voraus vielen dank!
>>
>> Mit freundlichen Grüssen
>>
>> Jens
>
>
More information about the TYPO3-german
mailing list