The Arabic language challenges

Scott Kindley <[email protected]>
Newsgroups gmane.comp.web.envolution.devel
Message-ID <[email protected]>
This came across the pn-dev list. I think this is something to look 
into. Not only from an Arabic standpoint but for any language. Seems
this method moves stuff out of the core and into language defines.

Any thoughts?

Zoom



-----Forwarded Message-----

> From: Mahmood Al-Yousif <[email protected]>
> To: pndev-2xlU4q7ZSRJWk0Htik3J/[email protected]
> Subject: [pndev] The Arabic language challenges
> Date: 24 Aug 2002 09:29:51 +0300
> 
> There are some challenges for the acceptance of the Arabic language that
> I suggest should be incorporated in any future versions of PostNuke.
> This will certainly increase PN's popularity in our world and hopefully
> benefit others as well.
> 
> These challenges could be summarized as follows:
> 
> 1. Right-to-Left orientation - this must be changed in the core, and
> 2. Switch text alignment - this can be handled through the theme design;
> ie: whatever is aligned to the left in a Latin language, must be
> switched to right alignment for the Arabic text so that the page display
> is correct.
> 
> All Arabic script is read and written from right to left. This means
> that all pages, paragraphs etc should be orientated properly (rtl).
> 
> As the orientation is the other way round as opposed to most other
> languages, this means that we also have to switch the ALIGN=LEFT to
> ALIGN=RIGHT so that the display is correct.
> 
> We achieved that by simply changes all hard-coded "ALIGN" directives in
> the themes and PN core pages to language variables that are translated
> on the fly by reading the appropriate language file and another very
> important thing to do here is to change the hard-coded stylesheet names
> to language variables so that the proper stylesheet is loaded dependent
> on language selection.
> 
> We hacked the "header.php" file minimally as well to remove the
> hard-coded stylesheet link and replaced it with a language define.
> 
> In the Arabic global.php we added the following defines:
> 
> define('_STYLE','a_style.css'); // Arabic style sheet where
> directionality if defined with "direction: rtl;"
> define('_STYLENN','a_styleNN.css');
> define('_CHARSET','windows-1256');
> define('_ALIGNR','LEFT');
> define('_ALIGNL','RIGHT');
> 
> While in the English (and other Latin languages) we added:
> define('_STYLE','l_style.css');
> define('_STYLENN','l_styleNN.css');
> define('_CHARSET','ISO-8859-1');
> define('_ALIGNR','RIGHT');
> define('_ALIGNL','LEFT');
> 
> Theme design:
> ============
> In order for a theme to correctly display Arabic pages and article, it
> must use the aligns as described in the language file, and as the
> graphics have to be created in "mirror" image so that they display
> properly on the rtl-oriented page, the graphic file names too must be
> defined in the theme's language files rather than hard coded.
> 
> For SeaBreeze for instance, we just flipped all images, renamed them
> with prefix "a_" while the original images where prefixed with "l_".
> 
> So that in the theme's Arabic language file we have:
> define('_LEFTBAR','a_leftbar.gif');
> define('_RIGHTBAR','a_rightbar.gif');
> 
> While in the English file:
> define('_LEFTBAR','l_leftbar.gif');
> define('_RIGHTBAR','l_rightbar.gif');
> 
> So the question is: Would you consider enacting these changes into PN
> core? I think the work is minimal and properly the largest enterprise it
> telling the theme designers what to do, ie documentation must be created
> (which I can do) to educate the users on why this change occurred and
> how they might be able to benefit from it.
> 
> Should you wish to download the archive, please unarchive it in a temp
> directory as the following core files are also included (don't want to
> overwrite any of your files!):
> 
> o-  header.php
> o-  print.php
> o-  language/eng/global.php
> o-  includes/blocks/poll.php (cosmetic changes, tabularized)
> o-  the whole SeaBreeze theme modified
> 
> My (bahraini.tv) website has been suspended due to "too many apache
> processes and tons of MySQL queries - too many resources" by the good
> folks at HostRocket... that should be resolved soon I hope.
> 
> regards
> Mahmood
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: pndev-unsubscribe-2xlU4q7ZSRJWk0Htik3J/[email protected]
> For additional commands, e-mail: pndev-help-2xlU4q7ZSRJWk0Htik3J/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.