What does the translatable
attribute, like translatable="false"
, mean?
The Translations Editor provides a consolidated and editable view of all of your default and translated string resources. For an introduction to translating your app for different languages, read Supporting different languages and cultures.
Translation strings in a resource are identified by two elements: the key and the context. The key is the actual identifier for a translation. Each file format has its own way to specify keys. For instance, for PO files the key is the msgid attribute for each entry.
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.
This attribute points out that this attribute will be the same for all locales. Why is it useful?
Full explanation: http://tools.android.com/recent/non-translatablestrings
So, generally, this means if don't put this attribute, you should always localize this resource, otherwise tell people and compiler that this is unique for all locales by specifying this attribute.
If you are supporting multiple languages, and there are some strings which should not be translated (that means same across all languages) then you can use translatable="false"
For ex: Numbers<string name="account_setup_imap" translatable="false">IMAP</string>
Detailed Description
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With