TextView Internationalization
TextView Internationalization
When calling TextView#setText
* Never call Number#toString()
to format numbers; it will not handle fraction separators and locale-specific digits properly. Consider using String#format
with proper format specifications (%d
or %f
) instead.
* Do not pass a string literal (e.g. "Hello") to display text. Hardcoded text can not be properly translated to other languages. Consider using Android resource strings instead.
* Do not build messages by concatenating text chunks. Such messages can not be properly translated.
Issue id: SetTextI18n
https://developer.android.com/guide/topics/resources/localization.html
Inspection Details | |
---|---|
Available in: | IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3 |
Plugin: | Android, 2022.3.1 Beta 2 |