Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-09-29 13:56:55

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

multilingual article support

Morning,

i can think of one more feature which would basically enable multilanguage blogs to work easier.

a
<code><txp:lang_browser /></code>
tag maybe, which should have the following functionality (as far as i can think it now):

I. analyse user browsers language setting on first site visit.
II. store this info in cookie and/or php session id
III. read cookie to display only articles of a certain category (?c=english / ?c=deutsch etc.)
if cookie present == override browser language setting read in I.
IV. supply option to change language of articles displayed manually (when for instance an english speaking person logs in from an internet cafe in spain on a spanish speaking browser) -> store this in cookie/php session id
V. invent a “article language” dropdown menu into the article write tab (to be stored along with article data)

etc.

any thoughts on this?
i was thinking to write a plugin for the most necessary options (browser language analysis and stored user language preference) first, but wouldn’t it be a most welcome feature to have this within the txp core already?


A hole turned upside down is a dome, when there’s also gravity.

Offline

#2 2006-09-30 11:45:09

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

Re: multilingual article support

This is probably best as a plugin, as many (most?) people won’t use this functionality at all.

Offline

#3 2006-09-30 12:30:35

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

Re: multilingual article support

I’d love to see a plugin that could handle this well. I’ve done a similar thing several years ago on a website (not using textpattern), with the main difference that I stored the language override in the querystring instead of in a cookie, because I didn’t want the website to require cookies, so it could be indexed better by search engines (unique URL per translation).

Some problems that I ran into:
  • how to link translations of the same article, so you can switch languages while being on an article page and see the translation of that same article. (I used a separate table to store the translations for the article, and used the main article table just to store language independent things like dates, categories)
  • what to do when there’s no translation of the article you’re viewing when switching languages (I showed a nice error message).
  • if the visitor has a non-supported language setting, what language do you fall back on by default? (I used just english and dutch, with english as default language)
  • in article listings, do you only show articles for that language or do also show links to an translation if there’s the article isn’t available in the language chosen by the user? (I chose the latter)

Last edited by ruud (2006-09-30 12:35:53)

Offline

#4 2006-10-09 22:00:06

jayrope
Plugin Author
From: Berlin
Registered: 2006-07-06
Posts: 687
Website Mastodon

Re: multilingual article support

well ruud. i am working on it. i already realized
1. analysis of browser language
2. store in session id
3. let user change language of articles displayed manually and store this in session id.
4. display articles accordingly (by using category 2 for the language setting – in my case only english, german and ALL

momentarily i am trying to change this functionality into a plugin.

the system i use at the moment doesn’t have any connection to the backend really, which is a drag. it would be most helpful to be able to store different versions of one article sometimes.
unfortunately my progging skills in textpattern are limited enough yet not to know, how to fit this optionj nto the backend – regardless of with a plugin or a hack – aswell as i don’t know how to store this information in mySQL – yet ,)
give me some time, maybe.
in any case i’d be inetrested in developping a system like this for textpatetrn together with anyone interested.

Last edited by jayrope (2006-10-09 22:01:26)


A hole turned upside down is a dome, when there’s also gravity.

Offline

Board footer

Powered by FluxBB