20

I registered a German and an English name for my Windows 8 app in the Windows Store Dashboard.

Afterwards I created two files in my solution:

Strings/de/Resources.resw with name "AppName" and value "German Title"
Strings/en/Resources.resw with name "AppName" and value "English Title"

Then I clicked on Edit App Manifest. In the display name field I entered "ms-resource:/AppName" but when I want to build my app I get an error which says that "NamedResource" cannot be found.

What am I doing wrong?

The documentation only writes: "Display Name: Specifies the friendly name for the app that is displayed to users. This string is localizable". But I have only one field (called Display name) in my app manifest to indicate my app name.

the_nuts
  • 5,634
  • 1
  • 36
  • 68
Benny Code
  • 51,456
  • 28
  • 233
  • 198

2 Answers2

32

Ok. I've found it! For the "Display name" in "Package.appxmanifest" I have to enter "ms-resource:AppName". One should also enter "ms-resource:AppName" for the "Package display name" field (in tab Packaging).

Benny Code
  • 51,456
  • 28
  • 233
  • 198
  • Same works for Xamarin projects. Although Resources are kept in the PCL project, you can add those resource files (.resw) to the UWP project with the same folder structure stated here and it will work for the app name. – Dpedrinha Mar 29 '17 at 17:09
  • One more thing: make sure the resource name is plain without special chars. I've used "App.Name" instead of "AppName" and while the build succeeded, the app store validation then failed. Using plain "AppName" without the dot makes validation pass. – Stefan Feb 02 '18 at 23:12
2

I'd like to add an addendum to Benny Neugebauer's answer. If your .resw file happens to be stored in another assembly (as mine was), you might have to give it the fully qualified path to your resource name.

For example, if your AppName string was in a project named OtherProject, and a file named AppResources, and had a key of AppName, you would use the following syntax:

ms-resource:OtherProject/AppResources/AppName

PingZing
  • 942
  • 5
  • 20
  • I have my strings in other submodule & by your way, it is giving error "NamedResource Not Found. Check that the string resource is defined and there is at least one instance defined in the resource.pri file contained in this package" – hellodear Oct 04 '17 at 11:13
  • Hm. Is your .appxmanifest using the `x-generate` token to declare supported languages, or are you doing it manually? I seem to recall that `x-generate` fails to bundle in resources in other assemblies unless you declare languages manually. – PingZing Oct 05 '17 at 11:40
  • I'm not using x-generate, I declared languages used manually in the appxmanifest file, but still getting the same error of @hellodear – Tommaso Scalici Aug 05 '18 at 18:05