Hello, could anyone suggest a good way for localizing a string like:
You are currently logged in as <asp:LoginName runat="server" />, if you would like to place an order using a different e-mail address, please <asp:LoginStatus LogoutText="<%$ Resources:UIText,SignOut" runat="server" />.
I found a few resources online that suggest splitting the string up into different translatable pieces, something like:
str1.Text = "You are currently logged in as "
str2.Text = ", if you would like to place an order using a different e-mail address, please "
But I was curious if anyone has a different solution? I tried to find an answer on my own, but if I missed an obvious solution, please forgive my mistake. I'd appreciate any feedback and thank you for your time.
None
0 Points
1 Post
Localizing strings containing controls
Aug 22, 2008 02:37 PM|taylon5|LINK
Hello, could anyone suggest a good way for localizing a string like:
You are currently logged in as <asp:LoginName runat="server" />, if you would like to place an order using a different e-mail address, please <asp:LoginStatus LogoutText="<%$ Resources:UIText,SignOut" runat="server" />.
I found a few resources online that suggest splitting the string up into different translatable pieces, something like:
str1.Text = "You are currently logged in as "
str2.Text = ", if you would like to place an order using a different e-mail address, please "
str3.Text = "."
<asp:Label meta:resourcekey="str1" runat="server /> <asp:LoginName runat="server" /><asp:Label meta:resourcekey="str2" runat="server /><asp:LoginStatus LogoutText="sign out" runat="server" /><asp:Label meta:resourcekey="str3" runat="server />
But I was curious if anyone has a different solution? I tried to find an answer on my own, but if I missed an obvious solution, please forgive my mistake. I'd appreciate any feedback and thank you for your time.
localization