Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a custom application page (apsx) with an <asp:Label> and i want to display a localized message in the label. I want to use an existing sharepoint resource key

MyPage.aspx

<asp:Label runat="server" ID="MyLabel" />

MyPage.aspx.cs

...
protected void Page_Load(object sender, EventArgs e) {
    MyLabel.Text = SPUtility.GetLocalizedString("$Resources:????????;", "??", (uint)Web.Language);
}
...

The problem is that i do not know the resource key (that's the ??? for), but only the translation. I have looked in every file at both C:\...\14\Resources and C:\inetpub\wwwroot\wss\VirtualDirectories\80\App_GlobalResources directories but no luck to find the resource key for the translation.

Is Sharepoint uses another directory for resources? How can i get the resource key? Is there any list with the resource keys existing in Sharepoint?

share|improve this question
    
What resource label are you searching? –  SPArchaeologist Apr 16 '13 at 9:38
    
do you use SharePoint 2010? –  Salvatore Di Fazio Apr 16 '13 at 10:12
    
Yes i use SharePoint 2010. I have the message (translation) The value of this field is not a valid number. that is the message displayed when you try to add a non number value in a number field. What i am looking for is the resource key of this message –  pbaris Apr 16 '13 at 10:34
    
why don't you have your own resources? –  Salvatore Di Fazio Apr 16 '13 at 10:45
    
One reason is that i don't want to rewrite the same messages again. It's not just one. Other reason is that suppose you have a task list, i want to take the status localized. –  pbaris Apr 16 '13 at 10:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.