Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-03-10 18:51:52

kartav
Member
From: Moscow, Russia
Registered: 2005-03-07
Posts: 18

Category & non-ASCII characters

Hi,
I see the serious problem…
If I want to implement categories with non-ASCII names (like Cyrillic) I would get something like
http://sitename.com/?c=%25D0%259A%25D0%25B0%25D1%2582%25D0%25B5%25D0%25B3%25D0%25BE
It is not very elegant URL, isn’t it?

Is there a solution to this problem?
Thanks in advance.

Last edited by kartav (2005-03-10 18:55:14)

Offline

#2 2005-03-10 20:41:49

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Category & non-ASCII characters

This has been reported before, and I think now it should work.

Well I’ve check and no. But of course, there is still ugly URL for the categories.

Is there already a ticket for this ?

Offline

#3 2005-03-13 02:28:07

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Category & non-ASCII characters

It’s not really fixable. If a category is supplied in a URL, we have to match it against categories in the database. If it’s dumbed down, it won’t match.


Alex

Offline

#4 2005-03-13 05:04:29

Jeremie
Member
From: Provence, France
Registered: 2004-08-11
Posts: 1,578
Website

Re: Category & non-ASCII characters

You could add a url-name column in the db for it, no ? Same as the articles…

Offline

#5 2005-03-13 17:45:31

Gobbr
New Member
From: Moscow, Russia
Registered: 2005-03-10
Posts: 3
Website

Re: Category & non-ASCII characters

Allright, boys.
Рepelsbey tell <a href=“http://forum.textpattern.com/viewtopic.php?pid=44700#44700”>here</a> about one solution of this problem.

Install stw_category_tree plugin.
Then go admin >> plugins >> stw_category_tree >> edit
And replace

<i>return tag($cat,‘a’,’ href=”’.$path.‘c=’.urlencode($cat).’”’);</i>

with

<i>return tag(gTxt($cat),‘a’,’ href=”’.$path.‘c=’.urlencode($cat).’”’</i>);

Rename all your categories in English.
for example: games, music

Now open your language file and add there translation of your categories.
for example:
games => игры
music => музыка

So, Here we come with elegant URLs and non-ASCII categories.

Last edited by Gobbr (2005-03-13 17:46:31)

Offline

#6 2005-05-23 11:18:19

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: Category & non-ASCII characters

Kudos to Gobbr for making me notice this. Other plugins that are title aware are upm_category_title, upm_section_title and my own etz_crumbs. Always use a URL-friendly category/section name and a title in your native language.

Last edited by Etz Haim (2005-05-23 11:19:21)

Offline

#7 2005-05-23 23:05:05

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: Category & non-ASCII characters

On second thoughts, Рepelsbey’s hack involves manually editing the language files, which is a kind of approach that I wouldn’t recommend.

upm_category_title, upm_section_title and etz_crumbs rely on database entries to do the translation; stw_category_list may be updated to to so in the future. For the impatient, you can always hack stw_category_tree to work with upm_category_title, just like etz_crumbs does.

Offline

#8 2005-05-31 09:17:34

Alexsis
New Member
From: Russia
Registered: 2005-03-13
Posts: 5

Re: Category & non-ASCII characters

> Etz Haim wrote:

> On second thoughts, Рepelsbey’s hack involves manually editing the language files, which is a kind of approach that I wouldn’t recommend.

upm_category_title, upm_section_title and etz_crumbs rely on database entries to do the translation; stw_category_list may be updated to to so in the future. For the impatient, you can always hack stw_category_tree to work with upm_category_title, just like etz_crumbs does.

how can i do?

Offline

#9 2005-05-31 12:35:29

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: Category & non-ASCII characters

Just follow the stw_category_list thread. I’ve already posted the instructions there.

Last edited by Etz Haim (2005-05-31 12:35:46)

Offline

#10 2005-07-19 13:41:50

marios
Archived Plugin Author
Registered: 2005-03-12
Posts: 1,253

Re: Category & non-ASCII characters

Be carefull not to enter any non ASCII characters in your cateegory fields, because i’t generates a numbered string,which is not deleatable from within TXp admin panel.
You have to delete it from the databae manually.
I think this is a bug, but haveen’t reported it there yet because I wan’t to be sure that it is.

regards, marios

Last edited by marios (2005-07-19 18:35:28)


⌃ ⇧ < ⌃ ⇧ >

Offline

#11 2005-07-20 22:53:18

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: Category & non-ASCII characters

You mean the category name fields and not the titles, right?

Offline

Board footer

Powered by FluxBB