Last week I ran into the issue of having to delete all the custom label and field translations for a specific language in Salesforce. My first attempt of doing it was using the migration tool, but after investigating a bit, I realized that it wasn’t possible to do it that way.
If you have some translations that need to be removed from Salesforce (It doesn’t have to be for all the labels, don’t worry) and you don’t know how to start, follow the next steps and you’ll be ready to go.
In you Salesforce org, go to Setup -> Translation Workbench -> Export
You will be asked what type of export do you want. Choose Bilingual and click Export as STF, like in the following image:
Salesforce will process your request and send you an email with the stf files for all the language translations you have. It will take some minutes if you have a lot of data, so be patient.
Once you have received the email open the link they give to you and it will redirect the browser to your Salesforce org’s Documents tab, where you’ll find the Bilingual compressed data. Download it and extract all in any folder you want.
Once you have extracted all the stf data in your computer, you’ll see multiple files, one for every language you have any translation in SF. You have to edit the file that contains the translations you want to remove.
In my case I have three files, and I only want to modify the spanish translation, so I will open the one named Bilingüees2020-02-15 1239.stf.
When you open it, you’ll see an explanation of how the file is structured, followed by a section of the metadata that is translated to that language in your org.
In order to mark a translation as deleted, you have to replace the translated text in the file for the following: <>.
I only have three texts translated to spanish in sf, two Contact fields and one label:
Let’s suppose I only want to delete the label translation. I would have to change the text “Prueba de blog”, which is the translation for the label, to ”<>”, so the final result would be the following:
Leave the rest of the file as it is, and save it.
Now, after having replaced all the translations you don’t want, we have to import the stf file, to do that, return to your Salesforce org, and go to Setup -> Translation Workbench -> Import.
Note: If you have modified multiple language translations, create a new zip file with all the files you have made changes to.
You’ll see a page with steps for importing the files. Press “Select file” in Step 3, and add the file containing your changes.
When you’re ready, press Import and Salesforce will start importing your changes. When it has processed everything, it will send you an email with the details, and your translations will be finally deleted.
Thanks for reading!