Export strings.xml to CSV files

Deepak Goyal
2 min readSep 30, 2020

In Android, we put the strings used in the project under the values folder. In the Android studio, you can use the translator editor to view the translations. But what if we need to share the strings used in the app to someone for e.g project client? No worries!!!

In this article, you will have the solution to that.

I was working on an Android app and my client asked me to provide the CSV file of strings used in the app. So I created a script to export the same.

In my app, I have used many xml files for the strings. Like one separate file to put the strings for a specific feature. For e.g: a file named faq.xml for the FAQs in the app and so on…

So this NodeJs script exports as many files as the xml files.

Link to the script:

It already explains how to use this script to export the CSV files for your project.

For the testing, I already included some files in the test folder so you can use the script to export CSV from the files under the test folder.

For your project, you just need to update the project path in the config.js file. If you want to ignore some files then you can add the file name to filesToIgnore array in the config.js file. It already has some file names such as colors.xml, styles.xml, etc.

So just try the script and let me know your feedback.

Any questions or issues, just let me know. I will be more than happy to help you.

Happy coding :)

--

--

Deepak Goyal

I’m a Software Engineer. I love programming. #java #android #kotlin #dart #flutter #firebase