Jump to content
Sign in to follow this  
Pat

(vyreseno) rewrite vcetne ceskych znaku

Recommended Posts

Zdravim,

nevi nekdo jak na rewrite, aby se zamenovali i:

ě -> e
š -> s
č -> c
ř -> r

atd??? Tyto znaky se v automaticky generovane adrese vynechaji uplne, coz je dost blbe, kdyz treba misto

drevena-hracka
mate v adrese
devna-hraka

Je to docela dost naprd, ze to clovek musi delat rucne.
Tohle uz tam meli zahrnout tvurci sakrys, to se tyka urcite i Nemcu apod ;o)....
Predem diky za odpoved.

Tom

Share this post


Link to post
Share on other sites

to jsem si upravil v souboru js/admin.js
jedna se o funkci str2url()

    str = str.replace(/[\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5]/g,'a');
   str = str.replace(/[\u00E7\u010D]/g,'c');
   str = str.replace(/[\u00E8\u00E9\u00EA\u00EB\u011B]/g,'e');
   str = str.replace(/[\u00EC\u00ED\u00EE\u00EF]/g,'i');
   str = str.replace(/[\u00F2\u00F3\u00F4\u00F5\u00F6\u00F8]/g,'o');
   str = str.replace(/[\u00F9\u00FA\u00FB\u00FC\u016F]/g,'u');
   str = str.replace(/[\u00FD\u00FF]/g,'y');
   str = str.replace(/[\u00F1]/g,'n');
   str = str.replace(/[\u0153]/g,'oe');
   str = str.replace(/[\u00E6]/g,'ae');
   str = str.replace(/[\u00DF]/g,'ss');
   str = str.replace(/[\u0161]/g,'s');
   str = str.replace(/[\u0159]/g,'r');
   str = str.replace(/[\u017E]/g,'z');
   str = str.replace(/[\u0148]/g,'n');
   str = str.replace(/[\u010F]/g,'d');
   str = str.replace(/[\u0165]/g,'t');

Share this post


Link to post
Share on other sites
to jsem si upravil v souboru js/admin.js
jedna se o funkci str2url()

    str = str.replace(/[\u00E0\u00E1\u00E2\u00E3\u00E4\u00E5]/g,'a');
   str = str.replace(/[\u00E7\u010D]/g,'c');
   str = str.replace(/[\u00E8\u00E9\u00EA\u00EB\u011B]/g,'e');
   str = str.replace(/[\u00EC\u00ED\u00EE\u00EF]/g,'i');
   str = str.replace(/[\u00F2\u00F3\u00F4\u00F5\u00F6\u00F8]/g,'o');
   str = str.replace(/[\u00F9\u00FA\u00FB\u00FC\u016F]/g,'u');
   str = str.replace(/[\u00FD\u00FF]/g,'y');
   str = str.replace(/[\u00F1]/g,'n');
   str = str.replace(/[\u0153]/g,'oe');
   str = str.replace(/[\u00E6]/g,'ae');
   str = str.replace(/[\u00DF]/g,'ss');
   str = str.replace(/[\u0161]/g,'s');
   str = str.replace(/[\u0159]/g,'r');
   str = str.replace(/[\u017E]/g,'z');
   str = str.replace(/[\u0148]/g,'n');
   str = str.replace(/[\u010F]/g,'d');
   str = str.replace(/[\u0165]/g,'t');



Super diky moc. Jsem nejak ani nevedel, kde to najit :o).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More