Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2016-01-29 04:03:58

sochicomputerRU
Member
From: Россия
Registered: 2013-01-18
Posts: 61
Website

Friendly non-English URLs? %BD%D0%B0

Good morning Textpattern team! I’m loving txp so much, because it is so easy to take a template and insert into it a few textpattern tags and build a great site really quick. Textpattern is comparable to C++Builder in its RAD-like features. The problem I come across while making site with URLs and titles in Russian is that links look something like this %BD%D0%B0. For example a permlink tag would output a URL like so:

http://test.sochicomputer.ru/%D0%B1%D0%BB%D0%BE%D0%B3/galaxy-a3-%D0%B7%D0%B0%D0%BC%D0%B5%D0%BD%D0%B0-%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0

It is horrible! In reality this URL should look like so:

http://test.sochicomputer.ru/блог/galaxy-a3-замена-экрана

I try not to think what will happen and how things will look when I switch to Russian .РФ domain name.

My wish for the new versions of textpattern is to implement a proper URL display. Presently I have to use php urldecode($str) for proper display. :(

Offline

#2 2016-01-29 06:32:58

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,138
Website

Re: Friendly non-English URLs? %BD%D0%B0

It is pretty annoying indeed for those of us who run non-roman-language sites (I’m my case Japanese). What I do is for category and sections, make sure the category/section name is in roman characters (transliteration), the category/section title can be in Cyrillic / Japanese / etc.

For individual articles, we do the same, filling in the URL-only title field.

For example, section name = ‘ringo’, title = 林檎 (that is apple in Japanese).
so, for an article with title ‘りんごジャム’ field in the section 林檎 , we end up with an URL example.com/ringo/ringo-jamu
At least, that is human readable, and for the Japanese web a pretty common pattern.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#3 2016-01-29 10:34:34

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,330
Website Mastodon

Re: Friendly non-English URLs? %BD%D0%B0

Try wcz_utf8_url – native unicode urls.

Also, please be advised that you thus violate RFC 1738 (which apparently does not matter much in real life):

Within those parts, an octet may be represented by

   the chararacter which has that octet as its code within the US-ASCII
   [20] coded character set.

   In addition, octets may be encoded by a character triplet consisting
   of the character "%" followed by the two hexadecimal digits (from
   "0123456789ABCDEF") which forming the hexadecimal value of the octet.
   (The characters "abcdef" may also be used in hexadecimal encodings.)

   Octets must be encoded if they have no corresponding graphic
   character within the US-ASCII coded character set, if the use of the
   corresponding character is unsafe, or if the corresponding character
   is reserved for some other interpretation within the particular URL
   scheme.

Offline

#4 2016-01-29 21:44:00

sochicomputerRU
Member
From: Россия
Registered: 2013-01-18
Posts: 61
Website

Re: Friendly non-English URLs? %BD%D0%B0

There you go! We need a check button in textpattern options advanced. violate RFC 1738

Offline

Board footer

Powered by FluxBB