Windows8 - Using localised string in C#

I have got problem with localizing my app. I have got file Resources.resw with string "noResults.Text" in it (it ends with .Text because I use it in xaml for textblock (x:Uid) ) Problem is that I want to use the same string in code behind (C#) How I can access it? I have tried something like this :

resourceLoader.GetString("noResults");
resourceLoader.GetString("noResults.Text");

But none of this work

Thanks in advance :)

Answers


Do something like this:

var loader = new Windows.ApplicationModel.Resources.ResourceLoader();
string result = loader.GetString("noResults/text");

Note that in your resource, if you are using "noResults.text", do not define another string as "noResults" (no extension).


Need Your Help

Best way to join tables using sqlite in android

java android sqlite join cursor

I am trying to find out the best way to do a simple table join on my two tables using a sqlite database in an android application. Is the simplest way to use CursorJoiner or is there any easier way?

AJAX call freezes browser for a bit while it gets response and executes success

javascript jquery ajax

I am doing an AJAX call to my webserver which fetches a lot of data. i show a loading image that spins while the ajax call is executed and then fades away.