Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Translated (non-ASCII) terms in URLs
There are at least two cases that I’ve found where translated terms show up as part of Textpattern-genereated URLs:
<txp:author link="y" />
generates links that end with i.e. /Χρήστης/Μήτσος+Παπαδόπουλος.<txp:comments_invite />
appends to the URL the translated word for comments, i.e. #σχόλιο.
The problems with non-ASCII characters in the URLs have been discussed extensively in these forums. Thankfully, “dirifying” for URL titles, and category and section titles have provided effective remedies for article, category and section URLs, respectfully.
When it comes to <txp:comments_invite />
, my opinion is that “#comment” should be appended untranslated to the URL, and the default templates/form shipped with Textpattern should default to <a name="comment">
too.
As for the link to the author’s articles, either the i18n-ascii.txt mechanism could be employed, or (preferably) links could just end with “/author/username”.
VC3 :: weblog :: my wishlist
Offline
Re: Translated (non-ASCII) terms in URLs
Etz Haim wrote:
When it comes to<txp:comments_invite />
, my opinion is that “#comment” should be appended untranslated to the URL, and the default templates/form shipped with Textpattern should default to<a name="comment">
too.
I disagree. In my case (french is still readable with ascii-only glyphs) I need to be able to localize it.
And more, imo it’s bad policy to change a basic URL’s portion just like that, because bookmarks and spider bots relies on it. This should be restricted to the very needed/important issues.
Offline
Re: Translated (non-ASCII) terms in URLs
Would you disagree to add an option to change the <txp:comments_invite />
to append to the URL whatever the individual webmaster considers fit for his cause? Or would you suggest something different?
Last edited by Etz Haim (2005-09-24 18:18:26)
VC3 :: weblog :: my wishlist
Offline
Re: Translated (non-ASCII) terms in URLs
That would be nicer for everyone, yes.
Offline
Re: Translated (non-ASCII) terms in URLs
“Category” also appears translated in URLs.
VC3 :: weblog :: my wishlist
Offline
Re: Translated (non-ASCII) terms in URLs
I’ve produced a patched version of TXP where substituting urlencode()
with dumbDown()
in certain places in publish.php
, taghandlers.php
and txplib_misc.php
has made it possible to dirify the translated words for “category”, “author”, “comment” etc. when they appear in URLs.
However, I did not submit a patch for it as it would:
- fail to work for alphabets not included in
i18n-ascii.txt
, e.g. chinese, and - it would affect backwards combatibility.
Therefore, as a first step, I propose for every translation to include the following strings:
section_ascii
category_ascii
author_ascii
comment_ascii
Then an option in the admin interface to extend dirifying to these kind of URLs could be added, with publish.php
, taghandlers.php
and txplib_misc.php
modified accordingly.
VC3 :: weblog :: my wishlist
Offline
Pages: 1