Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-27 20:22:32

simsim
Member
Registered: 2006-05-06
Posts: 70

Supporting RTL languages out of the box in TextPattern

Hello,

I highly suggesting implemeting this as a core feature of TP. Switching the layout of any website from LTR to RTL is not always an easy task to achieve, besides it should not be regarded as styleing issue that’s the site owner responsibilty. I haven’t looked deeply into TP general framework, but I think mostly that implementing this shall require PHP code modifying (not only HTML or CSS).

Amongst many online scripts that I worked with (both free & paid), I found so far only two scripts that provide full RTL support (not only translation files). These are:

1) vBulletin forum software: They provide a RTL test style on their official community site. You can check it here

2) MediaWiki. I don’t have a live example, but they do provide full RTL support out of the box too.

As for enriching this request with useful resources, I may suggest for the devs to read thorugh an interesting discussion about supporting RTL languages in Drupal CMS located here

I hope you find it helpful.

Thanks.

Offline

#2 2006-05-27 20:41:45

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

Re: Supporting RTL languages out of the box in TextPattern

It is a markup/styling issue, which is why in most places it is not available out of the box. VBulleting worked the logic into it’s default template. Which, is possible for Textpattern to do. Changing templates otherwise is impossible.

Offline

#3 2006-05-27 21:15:25

simsim
Member
Registered: 2006-05-06
Posts: 70

Re: Supporting RTL languages out of the box in TextPattern

Thanks for your feedback.

Well, I think one of TextPattern’s most obvious goals is to become a true international CMS. They provide a seperate forum for most spoken languages & they express their commitment towards supporting multilingual versions of TP.

I must state (again) that supporting RTL shouldn’t be regarded as a styling issue. It is a basic function for every user to be able to write his language in it’s own direction. If TP devs happened to develop it basically for RTL languages, I think no one would accept that he/she should dig into the templates doing lots aligning & editing just to prepare writing in the right direction.

Also, it’s not really something that soley related to text. The whole pages orientation should be switched. That includes: menues, images, buttons, …etc.

I think a proper sloution for this (since you say it only regards templates & not PHP) is to design seperate HTML/CSS files for RTL.

I didn’t understand what you mean by ‘Changing templates otherwise is impossible’!

Offline

#4 2006-05-28 05:24:45

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

Re: Supporting RTL languages out of the box in TextPattern

Also, it’s not really something that soley related to text. The whole pages orientation should be switched.

That’s exactly why it IS a template issue (which has nothing to do with php or no php): we’re talking about changing markup and style based upon the language.

With regards to the default template, we have a 3-column layout (sidebar, main, sidebar), that doesn’t favour any particular language. Websites aren’t books. While within individual blocks of text you may read rtl or ltr, overall you do not. For “left-to-right-ies” or “right-to-lefties” how does it matter? Both start at the middle and go left or right however they (the individual web surfer) feels like. Your example of VBulletin only makes sense and applies to forum software, where they traditionally favour strict left-to-right reading in the default layout.

It is with regard to someone elses markup and style is what I call impossible: how would Textpattern possibly know what should be swapped where?

It is a basic function for every user to be able to write his language in it’s own direction.

You already do/can, that’s what the dir HTML attribute is for (that link you gave). Textpattern doesn’t stop you from using it, makes it very easy for you to add if you need it.

Now, this could certainly be made easier via some kind of dir tag for templates (and added to the default templates) which figures out what it should be depending upon the language, for those who don’t want to change their templates. But usually, no one does. Even if they don’t want to make one themselves, they pick one someone else has made, and so we return to having to customize the templates anyway.

Offline

#5 2006-05-28 09:56:20

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Supporting RTL languages out of the box in TextPattern

simsim, mary is talking about the sites people can create. There you are indeed fully free to make any layout you want. And I don’t see what could limit people from creating RTL sites.

Though I suspect you may be talking about the admin-panel – is that correct? If so, can you describe more in detail what kind of things “don’t work” or are hard to use? Or to put it differently: What kind of changes would be necessary so it feels “right” for a RTL site? I’ve looked at the opening post in the drupal topic – is just the few lines that change the orientation in the browser?

Offline

#6 2006-05-28 13:32:02

simsim
Member
Registered: 2006-05-06
Posts: 70

Re: Supporting RTL languages out of the box in TextPattern

Thank you both.

@ Mary:

Your argument would have been 100% true if I want to implement a new design of TP that supports RTL sites. However, this is not the case at all, since I only want to implement an RTL site on a plain-vanilla installation of TextPattern. Give me one example of a language of those supported & included in TP that needs template editing from the end-user’s part before he/she is been able to enjoy TP is his/her own language? There is not because they all happened to be RTL languages that work fine since the default layout of TP is also happened to be RTL (There’s Hebrew which of course needs template editing)! RTL is a natural language issue & not markup language’s! And AFAIK, every language in the world is either LTR or RTL; so why not just having the other layout supported by default as one already is?

If we are to follow your reasoning, then we would expect TextPattern to have some kind of nuetral orientation, where every user has to dig into the templates to set it ready for his language’s direction. But the matter of fact is that TP is originally LTR oriented. Just glance a look at the templates to see the amount of ‘left’ aligntation in about every type of TP elements (specially forms & styles).

@ Sencer:

No, I’m not talking about the admin panel specifically, I’m talking about a whole site that is powered by TextPattern; wether the front-end or back-end of it. The drupal thread got deeper discussions about BiDi support which is the hard part of course. You may wish to continue reading for coping with that thread’s discussions.

I also, would like to add another reason for supporting RTL as a core feature. Compatibilty. I don’t want to do the same journey of aligntaion every time I want to install a theme submitted by one of TP’s talanted community members. A new theme should be nuetrally oriented & fits into every site regardless of it’s direction.

I’ve already faced code errors while just trying to edit the comment form aligntation from left to right, & I’ll reporting it shortly. This may another reason that is should be dealed by the devs not the end-users.

I’m looking forward to read both of your comments.

Last edited by simsim (2006-05-28 13:41:35)

Offline

#7 2006-05-28 15:52:46

Sencer
Archived Developer
From: cgn, de
Registered: 2004-03-23
Posts: 1,803
Website

Re: Supporting RTL languages out of the box in TextPattern

simsim, if you want to contribute code and patches, we’ll consider how and where best to integrate the suggested functionality.

A new theme should be nuetrally oriented & fits into every site regardless of it’s direction.

How do you suggest making this happen?

Offline

#8 2006-05-28 18:31:26

NyteOwl
Member
From: Nova Scotia, Canada
Registered: 2005-09-24
Posts: 539

Re: Supporting RTL languages out of the box in TextPattern

When I need that functionality I just enclose things in <code><bdo dir=“rtl”> . . . </bdo></code> tags. Though that might get tedious or present other issues for an entire site.


Obsolescence is just a lack of imagination. / 36-bits Forever! / #include <disclaimer.h>;

Offline

#9 2006-05-29 02:42:23

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

Re: Supporting RTL languages out of the box in TextPattern

simsim wrote:

If we are to follow your reasoning, then we would expect TextPattern to have some kind of nuetral orientation, where every user has to dig into the templates to set it ready for his language’s direction. But the matter of fact is that TP is originally LTR oriented. Just glance a look at the templates to see the amount of ‘left’ aligntation in about every type of TP elements (specially forms & styles).

You’re absolutely right to say that the default page templates in TXP are somewhat LTR oriented, with (forced) left-alignation of text. The layout of the comments-form is also heavily LTR oriented, being in a table construction.

The text-alignation on paragraphs can easily be changed: just go to the Presentation>style tab, and edit the stylesheet: in one of the very first lines, deleted the ‘text-align:left’ that you see there. Most decent UA, upon seeing text in a RTL language will do the correct thing, then – mostly.
The default layout for the comments-form requires some more work, though.

Under Presentation>page, you can also add dir="rtl" to the html tag for the 3 templates available (and change the ‘lang’ attribute to reflect the language-code you use).

=======

Maybe it is indeed something that should be improved in those default templates. On the other side, the idea for those templates is to give the (new) user of TXP an idea on how to use the various txp tags to build a site. It is intended as a sample, and not much more.

What authors of third-party templates for TXP sites (aka ‘themes’, some offered here on the forums) do is up to them, and if you want to use one of those, you’ll have to discuss it with the authors.


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

Offline

#10 2006-05-29 02:51:45

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

Re: Supporting RTL languages out of the box in TextPattern

@ mary or Sencer,
Can you remove that text-align left on the p tag in the default stylesheet? It is in txpsql.php, I guess, but is hashed, and require more time/energy that I have available right now.

It is not needed for those templates, and would partly fix the problems mentioned by the OP
Thanks


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

Offline

#11 2006-05-29 08:49:02

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

Re: Supporting RTL languages out of the box in TextPattern

Give me one example of a language of those supported & included in TP that needs template editing from the end-user’s part before he/she is been able to enjoy TP is his/her own language? There is not because they all happened to be RTL languages that work fine since the default layout of TP is also happened to be RTL

Sorry, but that makes no sense at all, you seem to be contradicting yourself. I am guessing there’s a typo or two in there bungling up what you mean?

RTL is a natural language issue & not markup language’s!

Yes, it is, when we’re talking about internet webpages, which I’ve been trying to explain to you. It is markup and style that determines how the page is layed out and which direction text runs in. The link you gave shows you just that, exactly. It’s not a “flip a switch” thing, which is why so few (as far as I know, none) cms’ work it all out for you.

I also, would like to add another reason for supporting RTL as a core feature. Compatibilty. I don’t want to do the same journey of aligntaion every time I want to install a theme submitted by one of TP’s talanted community members. A new theme should be nuetrally oriented & fits into every site regardless of it’s direction.

Again, that’s just not how it – web design – works. Themes or templates don’t just change colours, they change the very markup and styling used (some are indeed just styles and don’t touch markup, so no problem there) and there’s just no way for any cms to override that, because it can’t “read minds”, to put it simply. What you’d need to do for that is approach theme designers to make sure their markup and style won’t cause that kind of problem.

Can you remove that text-align left on the p tag in the default stylesheet?

It was already removed (dev svn branch).

Edit: er, looks like I forgot to commit something…

Just glance a look at the templates to see the amount of ‘left’ aligntation in about every type of TP elements (specially forms & styles).

See above; they’re already not there. :)

The only place it doesn’t, which has just now been mentioned, is the comment form, which has remained almost completely unchanged since the birth of the software. This is the kind of detail that is needed, we can’t fix unmentioned problems. :)

What should it look/act like? See, at the moment, the labels are on the left and are aligned to the right, so they butt-up against the field they are for. How do you convert that for rtl? Directly opposite would be labels on the right and aligned left, but somehow that doesn’t seem correct…

When we talk about doing this, we refer to a one-time-only choice (but of course, could be changed by hand later), where you get a ltr or rtl set of templates at install (depending upon the language you chose to install Txp with), otherwise it becomes nigh impossible, to possible but over-complicated to the absurd extreme.

Last edited by Mary (2006-06-01 22:19:41)

Offline

Board footer

Powered by FluxBB