Translator help
Hi.
Trying to make a simple translator for templates, where little snippets can be passed through, and it returns the translated string.
I’m running into one problem. In the code sample below, on my second call to
{exp:xlate t=“Login”}
I get the results of {exp:xlate t=“Username”} instead.
Logging calls inside my plugin, its as if {exp:xlate t=“Login”} is never called the second time.
However, if I make it {exp:xlate t=“Login2”} then it gets called properly.
Hoping someone can help clear up for me what’s happening here.
Code for plugin: http://pastebin.com/f35bb385
snip from template:
{if logged_out}
<div class="welcome_login">
<h2>{exp:xlate t="Login"}</h2>
<p><b>{exp:xlate t="Please enter your username and password and we’ll send you on your way."}</b></p>
{exp:member:login_form return="{path=messages}"}
<!-- always show logged in user list-->
<input type="hidden" name="anon" value="1" id="anon">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="label">{exp:xlate t="Username"}</td>
<td colspan="3"><input name="username" id="username" type="text" size="15" maxlength="20" class="input_text"></td>
</tr>
<tr>
<td class="label">{exp:xlate t="Password"}</td>
<td colspan="3"><input name="password" id="password" type="password" size="15" maxlength="20" id="password" class="input_text"></td>
</tr>
<tr>
<td></td>
<td><button type="submit">{exp:xlate t="Login"}</button></td>
<td><input class='checkbox' type='checkbox' name='auto_login' value='1' /> {exp:xlate t="Auto-login on future visits"}</td>
<td class="forgot_password"><a href="{path=member/forgot_password}">{exp:xlate t="Forgot your password?"}</a></td>
</tr>
</table>
{/exp:member:login_form}
</div>
{/if}
Thanks,
m.
Moved by Moderator to Plugins: Technical Assistance
