I've been trying to add internationalization to my Xamarin.Forms project I just started. I set up a few ContentPages and some of them currently have a few strings I need to show in different languages (i.e. english, spanish and russian). I've followed the steps to create the RESX file found in this Guide, but once I created the RESX file called
AppResources.resx, I get an error message who says:
Error: ResXFileCodeGenerator can only be used with .NET projects. I added the file to the root of the Xamarin.Forms common code project but it doesn't seem to be able to generate the
AppResources.Designer.cs. Also, in the Tool Output, I get this message:
Running generator 'ResXFileCodeGenerator' on file '/Users/Username/Dev/AppProject/AppProject/AppResources.resx'... Errors in file generation.
Also, once I create the resx file, I got not a blank file, but instead, a file with the following code (I don't know if that's normal or not):
<?xml version="1.0" encoding="utf-8"?> <root> <resheader name="resmimetype"> <value>text/microsoft-resx</value> </resheader> <resheader name="version"> <value>2.0</value> </resheader> <resheader name="reader"> <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=22.214.171.124, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> </root>
What can I do to get a localizable app? I don't have a Windows computer to create the files there (it would be a waste of time the change just to get the localization done) and I've seen some others complaining about the same thing, so it might be possible this is a bug.