[wp-polyglots] using xx_YY.php in translation files for setting directionality

Ryan Boren ryan at boren.nu
Sun May 13 18:09:21 GMT 2007


On 5/12/07, Ran Yaniv Hartstein <ran at trans.co.il> wrote:
> I can't find proper documentation in the codex for setting theme
> directionality and for other uses of the xx_YY.php file in the
> translation files.
>
> This article by Ryan Boren is the only reference I found on the
> matter, and it doesn't fully work for me:
> http://boren.nu/archives/2007/01/07/rtl-support-in-wordpress-21/

If you have your language is set to 'he', you put your he.mo and
he.php in wp-content/languages.  he.php would look like this:

<?php

$text_direction = 'rtl';

?>

> The install procedure and error message contain functions to be RTLed
> according the the text_direction variable, but they just don't work.

Which functions?  Install should be using install-rtl.css.

> Also, there is no documentation on how to use xx_YY.php file to change
> features in wordpress as a substitute to a plugin. For e.g., I have a
> filter plugin I want to include in this file. How do I go about doing
> that?

he.php is loaded shortly after plugins are loaded.  It's just like a
plugin except you don't have to activate it.  You can put whatever you
want in there.  Copy your plugin code into he.php and it should work.

Ryan


More information about the wp-polyglots mailing list