Category in other language
Category in other language
i found an interesting bug. When a category is in other language, s9y is not able to show it. for example in category 1, the name is 1-奇怪
but the link becomes 1-
so when clicking on that link, it just go to the main index, showing every entries, not just the entries in that category.
now if i put english character after 1-, it works just as it should be....
and if a category name starts with english character, it works fine too.
same goes to entry with multilingual title, but there's no problem, it's able to show the whole entry when clicking on it because a . is automatically inserted.
i only find it to be a problem for japanese, chinese, and korean s9y.
i'm having hard time finding which function controls category name, maybe somebody has an idea?
thanks!
but the link becomes 1-
so when clicking on that link, it just go to the main index, showing every entries, not just the entries in that category.
now if i put english character after 1-, it works just as it should be....
and if a category name starts with english character, it works fine too.
same goes to entry with multilingual title, but there's no problem, it's able to show the whole entry when clicking on it because a . is automatically inserted.
i only find it to be a problem for japanese, chinese, and korean s9y.
i'm having hard time finding which function controls category name, maybe somebody has an idea?
thanks!
Last edited by CapriSkye on Sun Nov 13, 2005 4:55 am, edited 2 times in total.
here's a quick fix, probably not the correct way to do it, but it does the job
open /include/functions_permalinks.inc.php
find:
replace with:
![Laughing :lol:](./images/smilies/icon_lol.gif)
open /include/functions_permalinks.inc.php
find:
Code: Select all
$path = serendipity_makePermalink($serendipity['permalinkCategoryStructure'], $data, 'category');
Code: Select all
$path = serendipity_makePermalink($serendipity['permalinkCategoryStructure'], $data, 'category') . 'c';
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Category in other language
Ah, sadly this is because your chinese characters are not allowed in URLs and thus are not matched by our permalink functions.
You could make it like the russion language files, which sets a i18n_filename_from and allows to transliterate the special characters?
Regards,
Garvin
You could make it like the russion language files, which sets a i18n_filename_from and allows to transliterate the special characters?
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/
# 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/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
I think you need to go through every available character in chinese? I don't know ANY chinese, so I don't know how large its alphabet is -- or if it even has something compared to the 27 character alphabet from America/Europe?!
Regards,
Garvin
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/
# 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/
yeah i was afraid that was the answer.garvinhicking wrote:I think you need to go through every available character in chinese? I don't know ANY chinese, so I don't know how large its alphabet is -- or if it even has something compared to the 27 character alphabet from America/Europe?!
Regards,
Garvin
it's not gonna work, way too many chinese characters out there.
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Okay, that's too bad then. How would we convert chinese characters in URLs? The only other way I see is then to rename each category to "/category/2-unknown.html" and so on?
Regards,
Garvin
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/
# 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/
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
I've just committed such a workaround in SVN, could you try it? It basically does not allow empty permalinks, and appends a "unknown" (or $i18n_unknown string, if set in language file) to the permalnk.
Regards,
Garvin
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/
# 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/