[TYPO3] Cooluri - multilingual support -

Darko Jr. Gonzalez jkokino at gmail.com
Sat Nov 10 11:35:33 CET 2007

>>> Jan, to answer you question, how can I test/view how Typo3 converts
>>> these characters?
>>I'm not sure. How about setting them as alias. Would they be converted then?

It is impossible to set an alias with cyrillic letter. Typo3 blanks it
on save. If I am not missing something here.

>This is the function I use to call t3 conversion:
>if (!self::$cs) {
>     if (!class_exists('t3lib_div')) return self::URLize($s);
>     self::$cs = t3lib_div::makeInstance('t3lib_cs');
>   }
>$charset = $GLOBALS['TSFE']->metaCharset;
>if ($charset == "") $charset = "utf-8";
>$text = self::$cs->specCharsToASCII($charset, $s);
>$text = str_replace('\'', '', $text);
>$text = preg_replace('/\W+/', '-', $text);
>$text = trim($text, '-');
>$text = strtolower($text);
>return $text;
>if you think there's something wrong about it, just let me know.
>Otherwise I really don't know how to help.

I am kinda puzzled why it fails on few characters, only and only these:
"љ,њ,ѕ,џ,ј". The first four are unique to cyrillic, pretty much. While
the last one is not! Further other characters like "ч,ш" are properly
converted to "ch,sh". And "х,ќ,ѓ" should be converted to "h,kj,gj",
instead, they are converted to "кх,к,г". I use this php code in an
external php file which I import with lumophpinclude. Conversion from
windows-1251 to utf8 which may be of help. Maybe cooluri should do
it's own standalone conversion?
$file = @file_get_contents( 'http://www.example.com/sample.txt' );
if ( empty($file) ) echo "File is being updated.";
	echo iconv( 'windows-1251', 'utf-8', $file );

Thanks for looking really!


More information about the TYPO3-english mailing list