Error translating previously marked strings as not translateable

0

Hello, did anyone ever go through this?

I checked some strings as Untranslatable in the Android Studio String Editor just to speed up the launch. In this update, I reopened the Android Studio Editor I took the checks and translated as usual. The problem is that every time I go to generate the apk it comes back and tells me it is marked with translate = false. I have already been in every bit of the strings and changed to true, but nothing works. The error continues while generating apk.

Someone can help me Thanks Elaine

    
asked by anonymous 21.04.2017 / 18:17

1 answer

0

To begin, click% with% and try to compile again. Sometimes it's just clearing the project data to resolve some stops in AS.

Since you did not show the folder structure and no code, let me suggest that you examine the string files for the location and format of the settings.

Let's say the app is in English (default) and Portuguese. Folders and translations should follow this template:

\SEUAPP\app\src\main\res\values\strings.xml

\SEUAPP\app\src\main\res\values-pt\strings.xml

In the string.xml of the value folder, strings that do not have translation follow this template:

<string name="app_name" translatable="false">NAME OF APP</string>

Those that have translation follow this:

<string name="app_name">NAME OF APP</string>

Do not put the attribute Build>Clean project or any other attribute besides translatable="true"

In the translated version:

<string name="app_name">NOME DO APP</string>

Check the files in the code editor, not the translation editor. Compare the files and see the differences.

    
22.04.2017 / 18:08