See http://groups.google.com/group/joomla-dev-cms/browse_thread/thread/c8abbff7f67f9a85?hl=en-GB#
Since Ian has added in 1.6 core the phputf8 library 2 days ago, I
propose we use that library for basic transliteration instead of the
present code. This would save most latin languages adding a specific
xx-XX.transliterate.php file.
Code could be something like:
---------------------------------------
function transliterate($string)
{
include_once
(JPATH_SITE.DS.'libraries'.DS.'phputf8'.DS.'utils'.DS.'ascii.php');
if ($this->_transliterator !== null) {
return call_user_func($this->_transliterator, $string);
}
$string = utf8_accents_to_ascii($string); // function available in
the phputf8 library
$string = JString::strtolower($string);
return $string;
}
--------------
instead of
----------------
function transliterate($string)
{
if ($this->_transliterator !== null) {
return call_user_func($this->_transliterator, $string);
}
$string = htmlentities(utf8_decode($string));
$string = preg_replace(
array('/ß/','/&(..)lig;/', '/&([aouAOU])uml;/','/&(.)[^;]
*;/'),
array('ss',"$1","$1".'e',"$1"),
$string);
return $string;
}
--------------
what do you think?