Hia Localizer Developers,

How I can run a multilanguage templating system specially for LTR languages on localizer ? any path module or document or sentence to help me do such a thing ???

Regards

Comments

edinjapan’s picture

I am no expert, but I believe the RTL vs LTR issue has more to do with the theme than anything else. If you look at the Drupal contributed themes, you will see many dedicated to a specific language direction.
You may need to make sure your MySQL DB is set up for the proper characterset and collation as well.
As far as I know though, Localizer is just keeping track of nodes and translations done, and really isn't dealing with the languages themselves.

daveloper’s picture

Thanks for your update,
I know I've to work with templtes, but I want to know more about this templates.
Specially I want to know more about the API which I can use to determaine the language and change the template output and more.

daveloper’s picture

A way:
add something like rtl_style.css with RTL styles and edit template.php and add:

function is_rtl_lang ($language) {
  $rtl_langs = array("ar", "fa", "he", "ur", "yi"); // There are a couple or so more. Put the codes of your RTL languages here
  if (module_exists ('locale') ) {
    if (isset ($language)) {
      return in_array ($language, $rtl_langs);
    }
  }
  return FALSE;
}

and change _phptemplate_variables function to:

    case 'page': {
                drupal_add_css($vars['directory'] . '/layout.css', 'theme');
                drupal_add_css($vars['directory'] . '/typography.css', 'theme');
        if (is_rtl_lang($vars['language'])) {
                drupal_add_css($vars['directory'] . '/rtl_style.css', 'theme');
        }
                $vars['styles'] = drupal_get_css();
    }

note that _phptemplate_variables will be called to setup variables like style strings and etc.