If Your site is in english You don't need even look into this

For others it might be of some interest.
In this thread (look in posts) following languages are covered:
- Latvian
- Turkish (by courtesy of selcukhoca)
- Greek (by courtesy of reanimator)
- Swedish (by courtesy of agentsmith)
- Spanish and Catalan (by courtesy of bramsyuur)
- French (by courtesy of Sven)
- German (by courtesy of reallySimple)
- Slovak and Czech (by courtesy of oniip)
When I was creating articles in local language - generated urls were messy - as all language specific characters were simply thrown away. For example, if article is called 'Grāvī grūti' the default sef will look like 'grv-grti' - not so easy to read and use. And there is need to keep those sef unique as well.
After applying this mod on sNews javascripts, for same 'Grāvī grūti' title following sef will be built by default : 'gravi-gruti'. While not exactly original title - this is still readable and easier to use.
This mod requires following changes in javascript function genSEF() located at js() (end of snews.php):
// generate SEF urls
function genSEF(from,to) {
if (allowsef == true) {
// MOD - 20070106 - Replaces characters specific to local language with available lowercase equivalent
// Original code
// var str = str.toLowerCase();
var str = deLocalize(from.value);
str = str.toLowerCase();
// End of MOD - 20070106 - Replaces characters specific to local language with available lowercase equivalent
//str = str.replace(/[^a-zA-Z 0-9]+/g,'');
str = str.replace(/[^a-z 0-9]+/g,'');
str = str.replace(/\s+/g, "-");
to.value = str;
}
}and introduction of new javascript function deLocalize() right after genSEF (example here is for latvian):
// MOD - 20070106 - New function to replace characters specific to local language with available lowercase equivalent
// Deal with local characters (latvian)
function deLocalize( inStr ) {
var outStr = inStr;
outStr = outStr.replace(/[āĀ]/g, 'a');
outStr = outStr.replace(/[čČ]/g, 'c');
outStr = outStr.replace(/[ēĒ]/g, 'e');
outStr = outStr.replace(/[ģĢ]/g, 'g');
outStr = outStr.replace(/[īĪ]/g, 'i');
outStr = outStr.replace(/[ķĶ]/g, 'k');
outStr = outStr.replace(/[ļĻ]/g, 'l');
outStr = outStr.replace(/[ņŅ]/g, 'n');
outStr = outStr.replace(/[šŠ]/g, 's');
outStr = outStr.replace(/[ūŪ]/g, 'u');
outStr = outStr.replace(/[žŽ]/g, 'z');
return outStr;
}
// End of MOD - 20070106 - New function to replace characters specific to local language with available lowercase equivalentAfter applying this generated urls were at least readable if a little misspelled
Modified script is used in administration part of sNews - so no public access demo for now.
For other languages deLocalize() should be tweaked accordingly

May be those, who find this mod handy can post their deLocalize() versions here, so others can reuse them as well
