Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Czech / Slovak Transliteration (Czechoslovak)
#1
Hello,
With assistance of Carlos (thank you) and his "cyrillic translit" and "roman translit" plugins, I created a transliteration plugin "czechoslovak translit" for Czech and Slovak languages.

What it does?
When you write a Czech/Slovak title of a page (or an article in the News Manager), this plugin transliterates the title for the url/slug in the correct way.
For example, a title
"Nejnovější články"
will be transliterated to
"nejnovejsi-clanky"
and no character is missing, which is very desirable for SEO.
Your URL with Fancy URLs will automatically look like
"yourwebpageadress.cz/nejnovejsi-clanky"
You don't have to edit the urls/slugs manually, this plugin will do it for you correctly from your title.

It's very simple, but it saves your time.

Here is the list of transliterated characters:
Code:
//special Czech chars with diacritics
    "ě"=>"e","Ě"=>"E","Å¡"=>"s","Å "=>"S","č"=>"c",
    "Č"=>"C","ř"=>"r","Ř"=>"R","ž"=>"z","Ž"=>"Z",
    "ý"=>"y","Ý"=>"Y","á"=>"a","Á"=>"A","í"=>"i",
    "Í"=>"I","é"=>"e","É"=>"E","ú"=>"u","Ú"=>"U",
    "ů"=>"u","Å®"=>"U","Ã…Â¥"=>"t","Ť"=>"T","ó"=>"o",
    "Ó"=>"O","ď"=>"d","Ď"=>"D","ň"=>"n","Ň"=>"N",
    
    //special Slovakian chars with diacritics (except those which are the same with Czech ones)
    "ä"=>"a","ĺ"=>"l","ľ"=>"l","ô"=>"o","ŕ"=>"r",
    "Ä"=>"A","Ĺ"=>"L","Ľ"=>"L","Ô"=>"O","Ŕ"=>"R",
    
    //other special chars
    " "=>"-","-"=>"-","»"=>">","."=>"."

In case you were thinking how to install this plugin, just download the .php file and copy it into /plugins folder in your GetSimple directory.

Tom


Attached Files
.php   czechoslovak_translit.php (Size: 978 bytes / Downloads: 6)
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
#2
Thanks Tom Wink
Reply
#3
(2013-04-05, 16:30:18)evan70 Wrote: Thanks Tom Wink
Are you from here? Big Grin

Sorry for OT, I won't do it again, I promise!
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
#4
Translit plugin isn't a bad thing.
But there is already such plugin, and whole transliteration function exist in GS since v3.0
You just have to add translit array into czech translation file, and set the language in user settings.
Addons: blue business theme, Online Visitors, Notepad
Reply
#5
(2013-04-05, 20:14:45)yojoe Wrote: Translit plugin isn't a bad thing.
But there is already such plugin, and whole transliteration function exist in GS since v3.0
You just have to add translit array into czech translation file, and set the language in user settings.
As far as I didn't know the right syntax of the array in lang file, I did it as a plugin. Carlos have already told me about this option.

In addition, this plugin works with more languages instead of one.
If I had added it just into cs_CZ.php for the Czech language, I would also have had to add it to sk_SK.php which I still don't have (and don't need).

So this is a plugin just for the heart of Europe Smile

I don't mind if no one downloads it. I have just posted it because there might be someone who would appreciate it. If not, nothing happens.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
#6
@yojoe This way users can select a different language for the backend (e.g. English) and keep slug transliteration working.
Reply
#7
I had on mind, that plugin will work regardless of chosen language Wink
That's very nice, because when GS gets a real multiuser funcitonality, this will become very handy.

Afair there was a discussion about transliteration, and the choice felt on translit array inside language file, not a global transliteration array with all UTF chars.
Addons: blue business theme, Online Visitors, Notepad
Reply




Users browsing this thread: 1 Guest(s)