Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
slug Transliteration
#6
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

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? =(
Reply


Messages In This Thread
slug Transliteration - by arthur_a_keen - 2011-04-22, 18:00:38
slug Transliteration - by polyfragmented - 2011-04-22, 21:10:08
slug Transliteration - by arthur_a_keen - 2011-04-23, 08:37:17
slug Transliteration - by oratoran - 2011-06-01, 16:17:19
slug Transliteration - by yojoe - 2011-06-01, 18:24:10
slug Transliteration - by oratoran - 2011-06-01, 19:33:52
slug Transliteration - by yojoe - 2011-06-01, 19:58:09
slug Transliteration - by oratoran - 2011-06-01, 23:52:53



Users browsing this thread: 4 Guest(s)