I have a little difficulty getting files of localized resources to work on Windows Phone 7. This is what I am doing: To create a string file, say "strings.rex" (build action: compile), say "testkey" with the default value of the empty string < Li> Add an English resource file to the same folder with the value of "Some English String": Strings.en-us.resx (Build Action: Embedded Resources)
In my PC, Silverlight, Dblupiaf app which works fine, I changed the thread. Existing content But in the phone I think that string is a value in the file - always a blank string.
I have tried to use the code generated by the designer and take the resource manager hand in hand and it does not matter here my code is:
type = T type (wire); _resourceManager = New Resource Manager (t.Namespace + "." + T.Name, t.Assembly); _resourceManager.GetString ("TestKey");
Let me know local resources are supported on the phone ...;> What am I doing wrong? Thanks!
Update : Thank you Oliver for forwarding the link. I noticed that this is also an important step but missed. I did not add the "supported culture" node to my CSPRJ all made the difference - hopefully trying to figure out someone else does not loosen for two hours like I did.
& lt; Supported Culture & gt; D-Day; Es-ES; & Lt; / Supported Culture & gt;
I wrote a blog post that provides links to a bunch After understanding this, it was just a matter of learning how to databases:
The MSDN article shows you how to setup files and create local level classes, but they believe that you How to use it for compelling data that class Visual Studio 2010 and Silver It keeps data in the bond differently than Vinfoms, and becomes even more confusing because Aksamel aside whatever your definition of resources to it. Silverlight uses word processing as a reference to files that use the "content" build action, because these files are wrapped in .XAP file such as how to embed files into the build process of "resource" is done. W. Assembly (eg: loading an image from content or resource files) I have found that using the following steps instead of using the text = "{binding path = resourceFile.resourceName, source = {StaticResource Localizedresources}}" XAML syntax Open
Open the property for the PhoneApplication page and open the datacontext.
To the application Set to be the session. Resource -> Local String Note: If you are already using a DataContext object, then you should integrate the localized straightening class in that object so that its localization is supported.
Once the page's datacentext is set, by simply selecting property (for example: text, checked, etc.) for any control on the page, "Data Binding Apply ... ", and set the path to local resources. BtnText or the name of the desired resource is the value.
Comments
Post a Comment