Localization is not working after publishing ASP.NET Core App

Abdul Najeeb Anwari 21 Reputation points

Hello guys,
I am using asp.net core and I am using Portable Object Localization.
My localization is working fine but after publishing my app, the localization is not working. I want to publish my web app to a folder. I defined (ps, en, prs-Af) localizations but I get the below folders.

A set of technologies in the .NET Framework for building web applications and XML web services.
4,280 questions
{count} votes

Accepted answer
  1. Zhi Lv - MSFT 32,051 Reputation points Microsoft Vendor

    Hi @Abdul Najeeb Anwari ,

    I mean after publishing to the folder no localization is working at all.

    Okay, I got it. Perhaps the issue relates the localization resource files, might be they are not published. You can check the localization resource file's property, make sure build action is "Embedded resource". Like this:


    After clicking the publish option, you can find the resource file from the language folder, like this:



    Then, you can copy these files (include the resource file), and host on IIS.

    Besides, when you right click the resource file, there also has an option to publish the resource file, you can also try to use this option.


    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,

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Abdul Najeeb Anwari 21 Reputation points

    Thank you so much!
    Publishing the Resources Folder Manually worked for me. I right-clicked on Resources folder and from context menu chose the Publish Resources option.

    0 comments No comments