How to retrieve a resource string value using K#?

Victor Hugo Garcia asked on August 14, 2014 16:01

Hello friends,

Checking the documentation I could not find a way to do that.

Basically I have an editable text webpart and on the page when adding the text, I'm trying to use this: {$ DemoResource $} and it prints: "DemoResource" it is not printing the value I put into resource string.

so, on "localization" -> I created a new string "DemoResource" and I put a text there into the default language. and what I would like to do is print that number into the editable text area, easily but no luck.

However when I use: {% GetResourceString("DemoResource") %} it works just fine. However for editors this is not friendly at all, so I was wondering how possible could be to just use: {$ DemoResource $}

Any hint or idea?

Thanks in advance

Correct Answer

Brenden Kehren answered on August 14, 2014 16:52

Have you tried {$DemoResource$} vs. {$ DemoResource $}?

1 votesVote for this answer Unmark Correct answer

Recent Answers


Victor Hugo Garcia answered on August 14, 2014 17:41

Hey!! that worked.

So, the space matters on this case.

Thank you so much.

1 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.