Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to open the Translation Editor using a different xml instead of strings.xml?

Tags:

android

xml

I have my strings stored in different .xml(s). Now, I need to do some translations for them and I was wondering if it is possible to open the Translation Editor for those xml. I tried but it only appears on the strings.xml

Your help will be greatly appreciated.

like image 799
Strauss Avatar asked Jul 15 '16 10:07

Strauss


People also ask

How do I open a translation editor?

Open from the Android viewIn the Project > Android panel on the left, select ModuleName > res > values. Right-click the strings. xml file, and select Open Translations Editor. The Translations Editor displays the key and value pairs from the strings.

What are strings xml?

String. xml file contains all the strings which will be used frequently in Android project. String. xml file present in the values folder which is sub folder of res folder in project structure.In Android Studio, we have many Views such as TextView,Button,EditText,CheckBox,RadioButton etc.

What is translate in xml?

Using XML to exchange information has become universally popular, and XML translation is the process by which the information contained within XML files is converted into any world language, regardless of character set.


1 Answers

This is old, but I figured something out that may be helpful for anyone looking.

  1. When you open the Translations Editor for a module, it will show all strings in the res folder, not just the "strings.xml" file. So if you have other .xml files with strings, they will be listed.

  2. The Android Studio UI only allows the Translation Editor to be opened from the "strings.xml" file. So if you have a module that has strings files without any xml file named "strings.xml" just create a blank "strings.xml" file in that res folder and use that to open the Translations Editor - it will list all strings.

like image 189
Greg Avatar answered Sep 28 '22 04:09

Greg