What i am trying to do is provide an eazy way for designers work with multi lingual pages.
Its only about labels and short messages, real content is stored in the database and will be handled by the business logic.
Here is how a design would look at the moment.
Code: Select all
<table width="333" border="1" class="tableDark">
<tr>
<td><?translate('User name')?></td>
<td><input name="username" type="text" id="username" accesskey="u" tabindex="1" /></td>
</tr>
<tr>
<td><?translate('Password')?></td>
<td><input name="password" type="password" id="password" accesskey="p" tabindex="2" /></td>
</tr>
<tr>
<td> </td>
<td><input name="login" type="submit" id="login" accesskey="l" tabindex="3" value="<?translate('Login')?>" /></td>
</tr>
</table>
</form>I was thinking about preg_replacing <label>text</label> by the translated string. But this will decrease speed rather a lot!
I was also thinking that it would be nice if i could overload print(), cause this would be more designer friendly.
I am kind of stuck with this one.
At the moment i implemented the <?translate()?> approach.
Also I got a nice class that keeps track of all translate calls inside every design and generates a .loc file for me.
I know i am new to this forum but any help would be appriciated!