Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find all String literal in my android project and move it to strings.xml file

Tags:

android

I'm currently working on the Android project. I'm mostly put all the string literals in strings.xml file. But in few cases, I directly inserted few strings in Java file directly.

Now, I want to give multilingual support for my project. So, that I have to find all string literal in my android project and want to move it to strings.xml. The manual process was too much time-consuming. Any other easy way to achieve this task in Android studio?


1 Answers

You can achieve it like this: Go to >Analyze>Inspect code e click ok on the pop up, after a few minutes, inspection results will be visible, and you should find hardcoded strings under "Android>Lint>Internationalization-Hardcoded text" Android Lint

like image 175
JamesRGNT Avatar answered Sep 22 '25 09:09

JamesRGNT