November Happy Hour will be moved to Thursday December 5th.

Localized text in Javascript

Vote:
 

Hi!

I need to localize text inside javascript code what should be executed on onblur event. That is my sample:

<asp:TextBox ID="SearchText" onfocus="this.value=''" onblur="this.value=(Here I need to get localized text from my language xml-file with translations)" TabIndex="1" runat="server" CssClass="SearchField" Text="<%$ Resources: EPiServer, search.searchstring %>" />

Thanks in advance!

 

 

#43033
Sep 09, 2010 12:24
Vote:
 

Is there any EpiServer's way to do it?

#43034
Sep 09, 2010 12:27
Vote:
 

If you databind it, you could just do a regular translate:

<asp:TextBox ID="SearchText" onfocus="this.value=''" onblur="this.value='<%# Translate("/my/text") %>'" TabIndex="1" runat="server" CssClass="SearchField" Text="<%$ Resources: EPiServer, search.searchstring %>" />
Or - am I missing the point?   

/Steve

#43051
Sep 09, 2010 23:38
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.