Works just great on my colleuges computer but not on mine, I must have missed something but I can't figure out what.
<asp:Literal ID="test" runat="server" Translate="/bla/bla/bla" />
VS2008 and when I surf to the page both say "Type 'System.Web.UI.WebControls.Literal' does not have a public property named 'Translate'."
I run CMS5 SP1 and VS2008 on Vista, SDK is NOT installed.
Hmm, this is odd...
I've looked in the code that handles the translation and there seems to be a miss in the handling of literal controls, i.e. we don't. I think this was overlooked because the literal control lies within the WebControls namespace. A label control worked fine for me, but one of the differences between them is that the label control inherits from WebControl.
Are you sure you where using a literal control on your collegues computer as well? I'm asking because I do not see any way aliteral control should work :/.
What you could do is to use something like:<asp:Literal ID="lit" runat="Server" text="<%$ Resources: EPiServer, button.search %>"/>
which would have been the same as:
<aspLiteral id="lit" runat="Server" translate="/button/search"/>
... had it worked.
Well, you are correct. I looked at his code and it was labels not literals. Thanks for the $Resources-tip, i'll try that instead.
The $Resources-tip is how you should implement translate. It is how you use $Resources when i normally work with asp.net and languange in an xml-file.
Not sure if you can use that on an <episerver:property...> but for all aps.net-controls likte literal and label etc.