I had this problem when it came to the logged-out homepage. My solution was to code it such that there was JavaScript on the page to populate some variables, and then those variables would be used in the actual script.
To show what I mean: If you look at the homepage while logged out, you'll notice this code in the source:
<script type="text/javascript">
var ml = new Object();
ml.joinheading = "Join Dreamwidth";
ml.entercode = "Enter your invite code:";
ml.usecode = "Use Code";
ml.cancel = "Cancel";
In the actual JavaScript file, I can then refer to these strings as ml.usecode and such. In the original BML, I print it like this:
$headextra .= <<HEAD;
<script type="text/javascript">
var ml = new Object();
HEAD
$headextra .= " ml.joinheading = \"" . BML::ml( ".create.join_dreamwidth", { sitename => $LJ::SITENAMESHORT } ) . "\";\n";
$headextra .= <<HEAD;
ml.entercode = "$ML{'.create.enter_code'}";
ml.usecode = "$ML{'.create.use_code'}";
ml.cancel = "$ML{'.create.cancel'}";
HEAD
Of course, you need to know how to code it this way, which limits it, really. I don't think anybody would expect someone to English-strip *this* much if they didn't know how, so it might just work to change the words. May want to ask about that though.
[edited multiple times to fix stuff. So sorry about the edit spam. :(]
no subject
To show what I mean: If you look at the homepage while logged out, you'll notice this code in the source:
In the actual JavaScript file, I can then refer to these strings as
ml.usecode
and such. In the original BML, I print it like this:Of course, you need to know how to code it this way, which limits it, really. I don't think anybody would expect someone to English-strip *this* much if they didn't know how, so it might just work to change the words. May want to ask about that though.
[edited multiple times to fix stuff. So sorry about the edit spam. :(]