Deactivating a Language through the database

Overview

Users will sometimes require the deactivation of a language on the portal but have no option to fully delete the localized pages through the DNN UI.

 

Solution

  1. Locate the correct culture code.
  2. Deactivate the Language for a Portal through the UI in Settings> Site Settings> Languages and unpublish the language.
  3. Although the language has been unpublished and the flag is no longer part of the control, some pages may still be accessible. Proceed to unpublish pages by running the following query:
    UPDATE Tabs SET HasBeenPublished = 0 WHERE CultureCode = 'CULTURE_CODE';
  4. Deactivate the language in the rest of the portals updating the PortalLanguages table by running the following query:
    UPDATE PortalSettings SET IsPublished = 0 WHERE LanguageID = (SELECT LanguageId from Languages WHERE CultureCode = 'CULTURE_CODE')
  5. Remove the culture code from the Alias by following the steps in Removing the URL culture code from the primary language of a site.

Testing

The language will no longer be available and pages translated will become unpublished.

Comments

0 comments

Please sign in to leave a comment.