Xamarin Forms: cannot add RESX for globalization

Trying to use globalization feature on Xamarin by following the guide however can't find the category Misc

or Resource File

in the dialog.

My Visual Studio version is version 15.1.

Steps I took:

  • Right click on the shared project
  • Select Add → New Item
  • The dialog box in the left pane is displayed Visual C#

    with 4 subcategories: Code, Data, Shared and Cross Platform. Miscellaneous is not one of them.
  • Tried type Resource

    in search bar, no result

Does anyone have this problem?

+3


source to share


1 answer


I was able to add the .resx files manually to the project in Visual Studio 2017 Community Edition by following these steps:

  • Create a .resx file in file explorer
  • In Visual Studio, add the existing file and select the generated file.
  • Visual Studio detects the file as resx and automatically creates a .designer.cs file.


Having done this, I was able to get the localization to work in my project by following the tutorial above and looking at the sample projects.

PS. In VS 2017, I noticed that if you are editing a file with a resource editor, some special characters do not work correctly. I would suggest using a text editor to edit the resx files.

+1


source







All Articles