Page 1 of 1

Problem with "umlauts" characters in entry title-&

Posted: Tue Jun 20, 2006 10:04 am
by sniff
Hi, I've found Serendipity really great blog SW, but...

I am from Czech republic and as you know we have many of "umlauts"
characters in our language. So when I use them in my entry title, these
characters are omitted in URLs.

For example: Entry title "Čeština" (characters C with wedge and s with
wedge) is converted to /archives/7-etina. I'd prefer /archives/cestina or
/archives/%C4%8Ce%C5%A1tina (which is UTF-8 encoded path).

So I tried to use your Custom Permalinks plug-in and it seems that this is
really thing I was looking for. I can use the the URL I want, but only in
the HTML output of the blog. In RSS feeds as well as XML-RPC pings the "old style" URL is used.

So my question is: Is there any hint or hack I can use the "cool URLs" produced by that plug-in in all output formats?

Many thanks

Sniff

Re: Problem with "umlauts" characters in entry tit

Posted: Tue Jun 20, 2006 11:48 am
by garvinhicking
Hi!

I see that you also posted here, so I'll reply here instead than by private mail. :)

Basically, what you seem to should be using is the Serendipity i18n permalink translation feature.

Inside your main language file (lang/serendipity_lang_cz.inc.php for example) you can define an array like this:

Code: Select all

$i18n_filename_from = array(
'ä',
'ö'
);

$i18n_filename_to = array(
'a',
'o'
);
With that you can define each character and to what it should be translated. Does that help you already further?

Best regards,
Garvin

Re: Problem with "umlauts" characters in entry tit

Posted: Tue Jun 20, 2006 6:04 pm
by sniff
Hi Garvin!
garvinhicking wrote: With that you can define each character and to what it should be translated. Does that help you already further?
Yes, I think so. Thanks a lot. I will change this file for me and will send back also to Serendipity team.

Another question is, if it is possible (on principe) to improve the Custom Permalinks plugin to change these URL also in all other formats (RSS, XML-RPC..)?

Thanks
Sniff

Re: Problem with "umlauts" characters in entry tit

Posted: Wed Jun 21, 2006 10:02 am
by garvinhicking
Hi!

That would be great, if you could contribute the needed array. :)
Another question is, if it is possible (on principe) to improve the Custom Permalinks plugin to change these URL also in all other formats (RSS, XML-RPC..)?
Sadly this isn't currently possible, because the function that creates permalinks (serendipity_archiveURL) cannot use input from a plugin. It could, but then that would really take up a lot of performance, because the plugin API would be called for each plugin transformation...

Best regards,
Garvin