Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The choice to put the RTLized css files under sites/all/modules, as opposed to the original function is not a bad idea at all, and saves a lot of work when extracting the zipped file and maintains the core's modules directories clean (until RTL CSS would be part of core).
However - isn't sites/all/themes a better (i.e. more intuitive) place for those files?
Comments
Comment #1
druvision CreditAttribution: druvision commentedModule-specific RTL CSS files are common to all themes, therefore I am moving this issue to the responsibility for this change from Garland RTL to Drupal's core language system and core theme system. I can't open this issue for both subsystems at once, so I open it for the core language system.
A previous discussion regarding the necessity of RTL CSS files and their location has already been started on issue 56110. Please continue to discuss it here.
To summerize the previous thread:
Currently, the RTL version of the core and contrib CSS files are stored with the RTL extension inside the Garland RTL theme.
We have the following open issues:
Currently, it's sufficient to have manual per-module CSS conversion - we don't have that many CSS files.
Some people asked for automatic CSS conversion. I don't think this is a priority issue. In the future, we may explore the area of automatic RTL conversion of the simple module CSS files, but it's a complex issue and I am not sure that it's needed. A generic perl algorithm with 10-20 rules may be defined, but we need a way to manually override it since it might not cover complex cases and external image references. Also, certain images must be manually converted anyway.
Here are my suggested requirements for RTL theming:
Where to store RTL CSS files?
Comment #2
Gábor HojtsyThe Drupal 6-dev based i18n work is also aimed at solving the management side, so that all languages have LTR/RTL direction information attached. The $locale global variable becomes $language and is getting a 'direction' property, which specifies whether the currently used language is RTL or LTR.
This does not solve the problem of possibly showing multilanguage content on the same page, but it is probably doable to tackle the RTL issue at least first on the page level.
Comment #3
z.stolar CreditAttribution: z.stolar commentedWhile it might be possible to identify the correct directionality on each page, it is still needed for core to supply the correct CSS.
Most of the CSS on a Drupal site, in most of the themes, is still coming from core CSS files, and not the theme's style.css file.
So even before showing two languages on the same page, we need to accomodate for bi-directionality support in core.
Comment #4
Gábor HojtsyIndeed, if you provide RTL versions of the core CSS files, and submit patches against the core themes to support RTL languages, then those should get into Drupal core as a basic feature as far as I see. This should not be a contrib addon IMHO (as far as core themes, and getting ready the theme system to support RTL languages).
Comment #5
Gábor HojtsyFor your information: Drupal 6.x-dev now has built in support for RTL languages. The RTL languages in the predefined language list were identified by Steven, and marked as such. If you find any omissions, please file an issue with a patch. Now Drupal 6.x-dev has a $language global object, which has a direction property. If it is zero, the language is LTR, if it is one, the language is RTL. Now, themes can make use of this, and CSS can be loaded based on this information. Feel free to base your implementation on this.
Comment #6
Gábor HojtsyDrupal 6 is getting RTL CSS files in other patches now. Look here for an overview of language issues, including RTL support: http://groups.drupal.org/node/3714 Marking duplicate.
Comment #7
Gábor HojtsyNeed people to help test the RTL support fixed in the installer: #1974040: When installing in an RTL language, it should be RTL from profile selection onwards.