Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-05-13 05:04:26

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

[issue] i18n /category/ url scheme

It’s quite an old issue, but it’s still in.

For localization purpose, it would be good to have two strings to localize category and author. One for the common use, and one dedicated for the url scheme. This would allow translators to select the best spelling for the /category/ and /author/ browsing url scheme.

Example in French:

Right now we have site.tld/cat%E9gorie/

We would like to be able to have site.tld/categorie/

And I’m guessing this issue exist for most non English languages.

Last edited by Jeremie (2007-05-13 15:08:32)

Offline

#2 2007-05-13 10:01:44

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: [issue] i18n /category/ url scheme

site./tld/categorie/ is not a valid URL. Do you mean: site.tld/fr-fr/categorie/ or site.tld/fr/categorie/

Offline

#3 2007-05-13 15:12:09

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

Re: [issue] i18n /category/ url scheme

Sorry, a typo. I meant that we would like to have site.tld/categorie/ in this example.

Nota: corrected in the first post.

Basically, it’s just using a language-string for the semi-hardcoded URL scheme (/category/ and /author/), separated from the “basic” translation. In the case of French, it’s a basic ascii conversion (no accent), but that may not be the case for other languages, hence the request for two new language string.

It has also the side benefit of allowing geek-webmaster of customizing their URL scheme (to transform /category/ into /tag/ for example) by using an edited locale language file (instead of the rpc one).

Offline

#4 2007-05-13 22:04:33

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

Re: [issue] i18n /category/ url scheme

Jeremie’s right, the decision to share the gTxt string in URLs was ill considered.

I think the safest solution is:

1. Rename the current ‘category’ text string to ‘label_category’ or similar
2. Change all calls from gTxt(‘category’) to gTxt(‘label_category’)
3. ..except for code that produces or parses URLs, which should remain as gTxt(‘category’)

That will retain backwards compatibility for anyone who has changed the value of the ‘category’ lang string; it’ll also fall back to the literal string ‘category’ if the lang file hasn’t been updated.

Patches, anyone?


Alex

Offline

#5 2007-06-08 20:15:13

FireFusion
Member
Registered: 2005-05-10
Posts: 698

Re: [issue] i18n /category/ url scheme

Does this mean we will be able to change the URL words “category” and “author” in 4.0.5?

Offline

#6 2007-06-08 22:16:10

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [issue] i18n /category/ url scheme

You always could, but technically I wouldn’t advise it yet.

Offline

Board footer

Powered by FluxBB