There are multiple possible ways to achieve this but the factor to decide the approach is - If you want to maintain other languages in Master DB or not?
Option 1
If you have additional publishing targets which need all languages hence you CAN’T delete language content other than English and French from Master DB. In this scenario:
- Either write Powershell scripts or custom scripts to delete the unwanted language content from Web DB, but for every future publish you have to make sure that it is not published again to that Web DB.
Or write Powershell scripts to mark the unwanted language versions Unpublishable
in Master Database and then perform Full/Smart/Incremental Publish. Once done undo the Unpublishable
flag, so that you can still publish to the additional publishing target.
Or after deleting the content from Web DB, you can customize the publishing pipeline to restrict the unwanted language publishing to the specific Web DB.
- Or let the content be in the Web DB but you can restrict those Language URLs on IIS level.
Option 2
If you DON’T have additional publishing targets and also you DON’T WANT to maintain language content other than English and French in Master DB. In this scenario:
- Write Powershell scripts or custom scripts to delete the unwanted language content from Master DB and then perform Full/Smart/Incremental Publish.
- Or you can simply delete the language itself and do the necessary cleanups for content.
Option 3
If you DON’T have additional publishing targets BUT you WANT to maintain all the language content in Master DB. In this scenario:
- Write Powershell scripts to mark the unwanted item version
Unpublishable
in Master Database and then perform Full/Smart/Incremental Publish.
Note:- Rather deleting directly from Web DB, controlling the content from Master Database and performing a publish should be a good fit as it will also update the relevant Indexes.