2011-06-01, 19:33:52
Hi again,
I am not php master =) and i didn't understand which language file?
I have modified admin/lang/en_US.php file which i used for my site language and added that code inside
so nothing changed; agian when i create a page its not convert non-latin.
If i need to modify also plugin/slugtranslit.php, please let me know where exactly:
or I am working on wrong places? =(
I am not php master =) and i didn't understand which language file?
I have modified admin/lang/en_US.php file which i used for my site language and added that code inside
Code:
"TRANSLITERATION" => array("Ç"=>"c","ç"=>"c","Ğ"=>"g","ğ"=>"g","ı"=>"i","İ"=>"i","ş"=>"s","Ş"=>"s","Ö"=>"o","Ö"=>"o"),
so nothing changed; agian when i create a page its not convert non-latin.
If i need to modify also plugin/slugtranslit.php, please let me know where exactly:
Code:
]<?php
$tf = basename(__FILE__,'.php');
register_plugin(
$tf,
'<code>slug</code> Transliteration',
'2',
'Martijn van der Ven',
'http://zegnat.com/',
'If you use a language with non ASCII characters <a href="http://en.wikipedia.org/wiki/Transliteration">transliteration</a> can be used by GetSimple to change your page titles into slugs.'
);
add_action('changedata-save','translit');
function translit($t=false,$m=false) {
global $i18n;
if (is_array($a=$m)||is_array($a=@$i18n['TRANSLITERATION'])||is_array($a=@$i18n['TRANSLIT'])) {
if (!$t&&isset($_POST['submitted'])) {
global $url, $xml, $file;
$t = ($u=$_POST['post-id'])?$u:($u=$_POST['post-title'])?$u:'temp';
$url = clean_url(to7bit(str_replace(array_keys($a),array_values($a),$t)));
unset($xml->url);
$note = $xml->addChild('url');
$note->addCData($url);
$file = GSDATAPAGESPATH.$url.".xml";
return true;
}
return str_replace(array_keys($a),array_values($a),$t);
}
else return false;
}
?>
or I am working on wrong places? =(