Error translating strings previously marked as untranslatable

Asked

Viewed 219 times

0

Hello, has anyone ever been through this?

I checked some strings like Untranslatable in the Android Studio String Editor just to speed up the release. In this update, I opened again the Android Studio Editor I took the checks and translated normally. The problem is that every time I generate the apk it comes back and tells me it is marked with Translate=false. I’ve been in every string pastiche and switched to true, but nothing works. Continue error while generating apk.

Can someone help me Thank you Elaine

1 answer

0

To start, click on Build>Clean project and try to compile again. Sometimes just clean the project data to resolve some stops in AS.

Since you have not shown 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 value folder string.xml, strings that have no translation follow this model:

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

Those that have translation follow this:

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

Don’t put the attribute translatable="true" or other attribute than name

In the translated version:

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

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.