Problem with non-latin categories

Found a bug? Tell us!!
Post Reply
robi-bobi
Regular
Posts: 40
Joined: Mon Nov 21, 2005 12:40 pm
Location: Bulgaria
Contact:

Problem with non-latin categories

Post by robi-bobi »

Hello

I am using UTF-8 encoding and Bulgarian language for this new blog:
http://www.bgevents.eu/

I have few categories added: Sport, Music ... - they are located in 'Категории' box, bottom right, you will find them by RSS icons ;)

The problem is that since categories are written in bulgarian, URL for the category itself looks like:
http://www.bgevents.eu/categories/1-unknown
instead of
http://www.bgevents.eu/categories/1-Музика

Is this behavior normal? (is it a feature or a bug :) )

I have some other problems like: not showing some Bulgarian characters in dates - from what I read on forums - it should be fixed by installing Bulgarian locales on the server (already wrote to support).

thanks
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Problem with non-latin categories

Post by garvinhicking »

Hi!

Those characters are invalid in an URL, so you cannot use this. Serendipity uses replacement techniques to strip out or replace invalid characters. Since in your bulgarian wording no latin characters are existing, s9y uses "unknown".

You have two options:

1. Live with it :)

2. Edit the bulgarian language file and insert $i18n_from and $i18_to variables, like in the russian language file. There you can specify how non-lating characters get replaced to latin ones. That might at least make it partially readable, if the resul would look like "Kateropnn"? :-)
I have some other problems like: not showing some Bulgarian characters in dates - from what I read on forums - it should be fixed by installing Bulgarian locales on the server (already wrote to support).
Exactly, that should fix your problem.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
robi-bobi
Regular
Posts: 40
Joined: Mon Nov 21, 2005 12:40 pm
Location: Bulgaria
Contact:

Post by robi-bobi »

Thanks.

Solution two sounds good enough. When I modify those files, I will send them to you.

edit:
my support says that they have bg_BG and bg_BG.utf installed

bg lang file says:
@define('DATE_LOCALES', 'bulgarian, bg, bg_BG');

I tried with
@define('DATE_LOCALES', 'bg_BG, bulgarian, bg');
and
@define('DATE_LOCALES', 'bg_BG.utf, bulgarian, bg, bg_BG');

but still no effect.

What else I could try?
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

Are you looking at the /lang/UTF-8/serendipity_lang_bg.inc.php file?

Code: Select all

@define('DATE_LOCALES', 'bg_BG.utf);
This should be the right one, if your server really has 'bg_BG.utf' installed! MAybe you need to try 'bg_BG.utf8' instead?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
robi-bobi
Regular
Posts: 40
Joined: Mon Nov 21, 2005 12:40 pm
Location: Bulgaria
Contact:

Post by robi-bobi »

bg_BG.utf8

yes, this was correct
:)


edit: it seems that static pages don't use localised dates
Post Reply