Is there a way to convert a strings.xml file to .resx

Min T 61 Reputation points
2024-10-08T20:33:54.52+00:00

So I have a C# project in VS2019 that targets and builds an apk for Android devices using Xamarin. Recently as xamarin is being deprecated Im looking into migrating the project to VS2022. One of the things notice is how the 2 handle resource files for localization.

In VS2019, our localization is in a strings.xml file in the folder structure and accessed through the Resource.designer.cs file/class

User's image

In VS2022 I see that the localization is done by adding a resource and the strings are in a resx file.

User's image

Is there a process that can convert our old strings.xml file to the new resx format or is that gonna be a manual process?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,924 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,602 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,023 questions
Microsoft Intune Android
Microsoft Intune Android
Microsoft Intune: A Microsoft cloud-based management solution that offers mobile device management, mobile application management, and PC management capabilities.Android: An open-source mobile platform based on the Linux kernel, developed by Google, and maintained by the Open Handset Alliance.
304 questions
0 comments No comments
{count} votes

Accepted answer
  1. Wenyan Zhang (Shanghai Wicresoft Co,.Ltd.) 32,471 Reputation points Microsoft Vendor
    2024-10-09T05:47:51.8066667+00:00

    Hello,

    Is there a process that can convert our old strings.xml file to the new resx format or is that gonna be a manual process?

    It's a manual process, you could copy the value then past to the resx file.

    strings.xml is still required for localizing the app's name.

    For more details, please refer to Localization - .NET MAUI | Microsoft Learn

    (I noticed that you have migrated your Xamarin project to MAUI, so I replace the Xamarin tag with MAUI tag)

    Best Regards,

    Wenyan Zhang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.