Knowledge Base

Documentation to help you use the POEditor localization platform effectively

Quotes in Android string resources

Owner Admin

Why quoted strings are the default for XML exports

When you translate Android app strings with POEditor, you may find when exporting your XML resource that quotes were added to the strings.

This isn't an error, don't worry. Using quotes is permitted, as is not using quotes.

<string name="good_example">"This will work"</string>

When we added support for Android string resources, the Google guidelines were recommending the use of quotes in language files, and we had to choose: quotes + new lines OR no quotes + \n.

We decided POEditor would use quoted strings for localization in Android, because they are safer when special characters appear. For example, if you have multiple whitespaces at the end of your text (or new lines), they would be removed in the non-quoted case.

In the meantime, Google quit making any recommendation regarding this aspect, but both versions (quoted or unquoted) should work in your localized Android app.

More information regarding styling and formatting of Android string resources can be found here: http://developer.android.com/guide/topics/resources/string-resource.html#FormattingAndStyling

How to remove quotes from strings on export

If you'd like to export your Android XML files without quotes, you can do this by checking the option Do not wrap strings in quotes in Advanced Options at the export step. Your export settings will be remembered by POEditor for each project language.

Export Android XML strings without quotes - POEditor translation management software

The same export option is available with the code hosting service integrations, when you click on Settings > Add Export Rule for a link made with an XML file.

You can export strings without quotes via API too. For this, use the argument options=[{"unquoted": 1}] with the projects/export method.

Additional help

Related articles