Rus-To-Lat - Version 0.1

Version Description

  • Initial release
Download this release

Release Info

Developer SergeyBiryukov
Plugin Icon wp plugin Rus-To-Lat
Version 0.1
Comparing to
See all releases

Version 0.1

Files changed (2) hide show
  1. readme.txt +25 -0
  2. rus-to-lat.php +34 -0
readme.txt ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Rus-To-Lat ===
2
+ Contributors: Anton Skorobogatov
3
+ Tags: l10n, translations, transliteration, slugs, russian, rustolat
4
+ Requires at least: 1.5
5
+ Tested up to: 1.5.2
6
+ Stable tag: 0.1
7
+
8
+ Converts Cyrillic characters in post slugs to Latin characters.
9
+
10
+ == Description ==
11
+
12
+ Converts Cyrillic characters in post slugs to Latin characters. Very useful for Russian-speaking users of WordPress.
13
+ You can use this plugin for creating human-readable links.
14
+
15
+ Thanks to Alexander Shilyaev for the idea.
16
+
17
+ == Installation ==
18
+
19
+ 1. Upload `rustolat` folder to the `/wp-content/plugins/` directory.
20
+ 2. Activate the plugin through the 'Plugins' menu in WordPress.
21
+
22
+ == Changelog ==
23
+
24
+ = 0.1 =
25
+ * Initial release
rus-to-lat.php ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /*
3
+ Plugin Name: RusToLat
4
+ Plugin URI: http://blog.zcore.ru/
5
+ Description: This plugin converts Cyrillic characters in post slugs to Latin characters. Very useful for Russian-speaking users of WordPress. You can use this plugin for creating human-readable links. Thanks to Alexander Shilyaev for the idea. Send your suggestions and critics to <a href="mailto:skorobogatov@gmail.com">skorobogatov@gmail.com</a>.
6
+ Author: Anton Skorobogatov
7
+ Author URI: http://blog.zcore.ru/
8
+ Version: 0.1
9
+ */
10
+ $tr = array(
11
+ "Ґ"=>"G","Ё"=>"YO","Є"=>"E","Ї"=>"YI","І"=>"I",
12
+ "і"=>"i","ґ"=>"g","ё"=>"yo","№"=>"#","є"=>"e",
13
+ "ї"=>"yi","А"=>"A","Б"=>"B","В"=>"V","Г"=>"G",
14
+ "Д"=>"D","Е"=>"E","Ж"=>"ZH","З"=>"Z","И"=>"I",
15
+ "Й"=>"Y","К"=>"K","Л"=>"L","М"=>"M","Н"=>"N",
16
+ "О"=>"O","П"=>"P","Р"=>"R","С"=>"S","Т"=>"T",
17
+ "У"=>"U","Ф"=>"F","Х"=>"H","Ц"=>"TS","Ч"=>"CH",
18
+ "Ш"=>"SH","Щ"=>"SCH","Ъ"=>"'","Ы"=>"YI","Ь"=>"",
19
+ "Э"=>"E","Ю"=>"YU","Я"=>"YA","а"=>"a","б"=>"b",
20
+ "в"=>"v","г"=>"g","д"=>"d","е"=>"e","ж"=>"zh",
21
+ "з"=>"z","и"=>"i","й"=>"y","к"=>"k","л"=>"l",
22
+ "м"=>"m","н"=>"n","о"=>"o","п"=>"p","р"=>"r",
23
+ "с"=>"s","т"=>"t","у"=>"u","ф"=>"f","х"=>"h",
24
+ "ц"=>"ts","ч"=>"ch","ш"=>"sh","щ"=>"sch","ъ"=>"'",
25
+ "ы"=>"yi","ь"=>"","э"=>"e","ю"=>"yu","я"=>"ya"
26
+ );
27
+
28
+ function sanitize_title_with_translit($title) {
29
+ global $tr;
30
+ return strtr($title,$tr);
31
+ }
32
+
33
+ add_action('sanitize_title', 'sanitize_title_with_translit', 0);
34
+ ?>