Globalization for existing .net MVC application

Nideesh Manian Sivasubramanian 21 Reputation points
2022-08-01T15:35:27.33+00:00

How to add globalization feature on an existing application. Application is created using MVC. Some static data, as well as some data stored in database. Is there any tool that can identify the strings. Manually we may need to go through each code.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,199 questions
0 comments No comments
{count} votes

Accepted answer
  1. Zhi Lv - MSFT 32,016 Reputation points Microsoft Vendor
    2022-08-02T06:02:48.117+00:00

    Hi @Nideesh Manian Sivasubramanian ,

    Here are some relates articles about use Globalization and Localization with Asp.net core application, you can refer to them:

    Bilingual with .Net Core MVC or Globalization And Localization In ASP.NET Core MVC 3.1

    How to use Globalization and localization in ASP.NET Core

    Globalization and Localization with Resource Files in ASP.NET Core

    Globalization and localization in ASP.NET Core (View or download sample code)

    If meet any problem when adding the Globalization to the Asp.net core MVC application, please fell free to post the problem on this forum.


    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.

    Best regards,
    Dillion

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Nideesh Manian Sivasubramanian 21 Reputation points
    2022-08-02T07:37:30.38+00:00

    I am looking to add globalization feature for an already existing project.
    Is there any tool which can give a report on how many button, labels, div, textbox titles are there in razor page ?


  2. Nideesh Manian Sivasubramanian 21 Reputation points
    2022-09-27T13:53:08.017+00:00

    I used regex to find the strings in double quote and singe quote while avoiding C# comment to get all the hardcoded string in files. This gave me the list of hardcoded string which may be needed to move to resource files. It is manual process and big one too. After removing all the logging comments, the list became much smaller.
    As for html files, we manually checked in each html file.
    Any missing hardcoded string needs to be caight during regression testing.
    (?=(^((?!///).)$)).((".+?")|('.+?')).* in ".cs;.resx;.resw;.xsd;.wsdl;.xaml;*.xml"

    0 comments No comments