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