Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove a string in all the languages Android

I have an app with several translations, and I want to delete some strings.

How can I refactor and delete them only once for example in the default strings.xml file and automatically propagate the deletion to the other strings.xml file of other translations?

like image 742
Addev Avatar asked May 29 '14 08:05

Addev


2 Answers

You can remove all translations by "Translations Editor" in Android Studio.

  1. Select string's key
  2. Click on "Remove key" button
  3. Uncheck all checkboxes in "Delete" dialog
  4. Click "OK" button in "Delete" dialog

enter image description here

like image 78
Dmitry Ognev Avatar answered Oct 05 '22 23:10

Dmitry Ognev


  1. CTRL-H
  2. select tab File Search
  3. check regular expression
  4. input \R\s*<string name="string_name">(.|\R)*?</string> and don't forget replace string_name to actual string name.
  5. file name patterns set *.xml
  6. Press Replace...
  7. Leave replace field empty.
  8. Press Preview >
  9. Check all replacement.
  10. Apply changes by press `Ok'
like image 28
Enyby Avatar answered Oct 05 '22 22:10

Enyby